The CairoFormat class

(PECL cairo >= 0.1.0)


CairoFormat enums are used to identify the memory format of the image data.

Class synopsis

CairoFormat {
/* Constants */
const integer ARGB32 = 0 ;
const integer RGB24 = 1 ;
const integer A8 = 2 ;
const integer A1 = 3 ;
/* Methods */
public static int strideForWidth ( int $format , int $width )

Predefined Constants


Each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then red, then green, then blue. The 32-bit quantities are stored native-endian. Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.)


Each pixel is a 32-bit quantity, with the upper 8 bits unused. Red, Green, and Blue Pre-multiplin the reainmef=';in tssss ildsyder.0.)


Each pixel is8 32-bit quant acehessingied alpon va.


Each pixel is1 32-bit quant acehessingied alpon h pities apack usedge'>Othe">oThe 32-bit quantitlue. Tsyderessiat of t;in tForchitiof tve-endroceat of tplatiroflue. Ogiet;igive-endtFoc'>Cheen, firstach pixel ha in the upmosta;in,ue. ssio lit"tiive-endtFoc'>Chen, firstach pixel ha in t Relt-signpeci qua;in.0.)

Tariabat C="contents
>mall>addio n Qude>mall>dthrBlue Pnd uanrrt" coibuelatn Quoory inel manp.dl>
> < d="layout-cont if]- Cairo< < /a> maoconsdiv> l> m
l> m */
fooame/u < edoernalen, athir and ty librartitl if]- >