GXDE Bernese
Loading...
Searching...
No Matches
bernese::image_utils::internal::ChannelSum Struct Reference

Public Member Functions

void Accumulate (QRgb pixel, int weight)
 Add or subtract one premultiplied pixel from the running sum.
QRgb Average (int sample_count) const
 Compute the averaged premultiplied pixel.

Public Attributes

qint64 red = 0
qint64 green = 0
qint64 blue = 0
qint64 alpha = 0

Member Function Documentation

◆ Accumulate()

void bernese::image_utils::internal::ChannelSum::Accumulate ( QRgb pixel,
int weight )
inline

Add or subtract one premultiplied pixel from the running sum.

Parameters
pixelPremultiplied pixel channels.
weightUse 1 to add or -1 to remove a sample.

◆ Average()

QRgb bernese::image_utils::internal::ChannelSum::Average ( int sample_count) const
inline

Compute the averaged premultiplied pixel.

Parameters
sample_countPositive number of samples represented by the sum.
Returns
Packed averaged channels.

The documentation for this struct was generated from the following file: