// use explicit here to make sure everyone knows what he is doing. Values range from // 0..255 integer here. explicit BPixel(sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue, sal_uInt8 nAlpha)
{
maPixelUnion.maRGBA.mnR = nRed;
maPixelUnion.maRGBA.mnG = nGreen;
maPixelUnion.maRGBA.mnB = nBlue;
maPixelUnion.maRGBA.mnA = nAlpha;
}
// constructor from BColor which uses double precision color, so change it // to local integer format. It will also be clamped here.
BPixel(const BColor& rColor, sal_uInt8 nAlpha)
{
maPixelUnion.maRGBA.mnR = sal_uInt8((rColor.getRed() * 255.0) + 0.5);
maPixelUnion.maRGBA.mnG = sal_uInt8((rColor.getGreen() * 255.0) + 0.5);
maPixelUnion.maRGBA.mnB = sal_uInt8((rColor.getBlue() * 255.0) + 0.5);
maPixelUnion.maRGBA.mnA = nAlpha;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.