2017-10-04 18:31:33 +00:00
SkBitmap Reference
===
2018-10-16 14:30:28 +00:00
2018-10-08 18:57:48 +00:00
< a name = 'SkBitmap' > < / a >
2018-10-16 14:30:28 +00:00
---
2018-10-08 18:57:48 +00:00
< pre style = "padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
class < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > {
< a href = 'SkBitmap_Reference#SkBitmap' > public< / a > :
2018-10-08 18:57:48 +00:00
< a href = '#SkBitmap_empty_constructor' > SkBitmap()< / a > ;
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > src< / a > );
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & & < a href = 'SkBitmap_Reference#SkBitmap' > src< / a > );
~< a href = '#SkBitmap_empty_constructor' > SkBitmap()< / a > ;
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > operator< / a > =(< a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > src< / a > );
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > operator< / a > =(< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & & < a href = 'SkBitmap_Reference#SkBitmap' > src< / a > );
< a href = 'SkBitmap_Reference#SkBitmap' > void< / a > < a href = '#SkBitmap_swap' > swap< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > other< / a > );
< a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = '#SkBitmap_pixmap' > pixmap()< / a > < a href = '#SkBitmap_pixmap' > const< / a > ;
< a href = '#SkBitmap_pixmap' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = '#SkBitmap_info' > info()< / a > < a href = '#SkBitmap_info' > const< / a > ;
< a href = '#SkBitmap_info' > int< / a > < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > const< / a > ;
< a href = '#SkBitmap_width' > int< / a > < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > const< / a > ;
< a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > const< / a > ;
< a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > () < a href = '#SkBitmap_alphaType' > const< / a > ;
< a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > * < a href = '#SkBitmap_colorSpace' > colorSpace< / a > () < a href = '#SkBitmap_colorSpace' > const< / a > ;
< a href = 'undocumented#sk_sp' > sk_sp< / a > < < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > > < a href = '#SkBitmap_refColorSpace' > refColorSpace< / a > () < a href = '#SkBitmap_refColorSpace' > const< / a > ;
< a href = '#SkBitmap_refColorSpace' > int< / a > < a href = '#SkBitmap_bytesPerPixel' > bytesPerPixel< / a > () < a href = '#SkBitmap_bytesPerPixel' > const< / a > ;
< a href = '#SkBitmap_bytesPerPixel' > int< / a > < a href = '#SkBitmap_rowBytesAsPixels' > rowBytesAsPixels< / a > () < a href = '#SkBitmap_rowBytesAsPixels' > const< / a > ;
< a href = '#SkBitmap_rowBytesAsPixels' > int< / a > < a href = '#SkBitmap_shiftPerPixel' > shiftPerPixel< / a > () < a href = '#SkBitmap_shiftPerPixel' > const< / a > ;
< a href = '#SkBitmap_shiftPerPixel' > bool< / a > < a href = '#SkBitmap_empty' > empty()< / a > < a href = '#SkBitmap_empty' > const< / a > ;
< a href = '#SkBitmap_empty' > bool< / a > < a href = '#SkBitmap_isNull' > isNull< / a > () < a href = '#SkBitmap_isNull' > const< / a > ;
< a href = '#SkBitmap_isNull' > bool< / a > < a href = '#SkBitmap_drawsNothing' > drawsNothing< / a > () < a href = '#SkBitmap_drawsNothing' > const< / a > ;
< a href = '#SkBitmap_drawsNothing' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > () < a href = '#SkBitmap_rowBytes' > const< / a > ;
< a href = '#SkBitmap_rowBytes' > bool< / a > < a href = '#SkBitmap_setAlphaType' > setAlphaType< / a > (< a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > );
< a href = '#SkBitmap_alphaType' > void< / a > * < a href = '#SkBitmap_getPixels' > getPixels< / a > () < a href = '#SkBitmap_getPixels' > const< / a > ;
< a href = '#SkBitmap_getPixels' > size_t< / a > < a href = '#SkBitmap_computeByteSize' > computeByteSize< / a > () < a href = '#SkBitmap_computeByteSize' > const< / a > ;
< a href = '#SkBitmap_computeByteSize' > bool< / a > < a href = '#SkBitmap_isImmutable' > isImmutable< / a > () < a href = '#SkBitmap_isImmutable' > const< / a > ;
< a href = '#SkBitmap_isImmutable' > void< / a > < a href = '#SkBitmap_setImmutable' > setImmutable< / a > ();
< a href = '#SkBitmap_setImmutable' > bool< / a > < a href = '#SkBitmap_isOpaque' > isOpaque< / a > () < a href = '#SkBitmap_isOpaque' > const< / a > ;
< a href = '#SkBitmap_isOpaque' > bool< / a > < a href = '#SkBitmap_isVolatile' > isVolatile< / a > () < a href = '#SkBitmap_isVolatile' > const< / a > ;
< a href = '#SkBitmap_isVolatile' > void< / a > < a href = '#SkBitmap_setIsVolatile' > setIsVolatile< / a > (< a href = '#SkBitmap_setIsVolatile' > bool< / a > < a href = '#SkBitmap_isVolatile' > isVolatile< / a > );
< a href = '#SkBitmap_isVolatile' > void< / a > < a href = '#SkBitmap_reset' > reset()< / a > ;
< a href = '#SkBitmap_reset' > static< / a > < a href = '#SkBitmap_reset' > bool< / a > < a href = '#SkBitmap_ComputeIsOpaque' > ComputeIsOpaque< / a > (< a href = '#SkBitmap_ComputeIsOpaque' > const< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > bm< / a > );
< a href = 'SkBitmap_Reference#SkBitmap' > void< / a > < a href = '#SkBitmap_getBounds' > getBounds< / a > (< a href = 'SkRect_Reference#SkRect' > SkRect< / a > * < a href = 'SkRect_Reference#SkRect' > bounds< / a > ) < a href = 'SkRect_Reference#SkRect' > const< / a > ;
< a href = 'SkRect_Reference#SkRect' > void< / a > < a href = '#SkBitmap_getBounds' > getBounds< / a > (< a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > * < a href = 'SkIRect_Reference#SkIRect' > bounds< / a > ) < a href = 'SkIRect_Reference#SkIRect' > const< / a > ;
< a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > < a href = '#SkBitmap_bounds' > const< / a > ;
< a href = 'undocumented#SkISize' > SkISize< / a > < a href = '#SkBitmap_dimensions' > dimensions()< / a > < a href = '#SkBitmap_dimensions' > const< / a > ;
< a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > < a href = '#SkBitmap_getSubset' > getSubset< / a > () < a href = '#SkBitmap_getSubset' > const< / a > ;
< a href = '#SkBitmap_getSubset' > bool< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > (< a href = '#SkBitmap_setInfo' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > imageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > = 0);
< a href = '#SkBitmap_rowBytes' > enum< / a > < a href = '#SkBitmap_AllocFlags' > AllocFlags< / a > {
2018-10-08 18:57:48 +00:00
< a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > = 1 < < 0 ,
};
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_kZeroPixels_AllocFlag' > bool< / a > < a href = '#SkBitmap_tryAllocPixelsFlags' > tryAllocPixelsFlags< / a > (< a href = '#SkBitmap_tryAllocPixelsFlags' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > uint32_t< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > flags< / a > );
< a href = 'SkImageInfo_Reference#SkImageInfo' > void< / a > < a href = '#SkBitmap_allocPixelsFlags' > allocPixelsFlags< / a > (< a href = '#SkBitmap_allocPixelsFlags' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > uint32_t< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > flags< / a > );
< a href = 'SkImageInfo_Reference#SkImageInfo' > bool< / a > < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > (< a href = '#SkBitmap_tryAllocPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > );
< a href = '#SkBitmap_rowBytes' > void< / a > < a href = '#SkBitmap_allocPixels' > allocPixels< / a > (< a href = '#SkBitmap_allocPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > );
< a href = '#SkBitmap_rowBytes' > bool< / a > < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > (< a href = '#SkBitmap_tryAllocPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > );
< a href = 'SkImageInfo_Reference#SkImageInfo' > void< / a > < a href = '#SkBitmap_allocPixels' > allocPixels< / a > (< a href = '#SkBitmap_allocPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > );
< a href = 'SkImageInfo_Reference#SkImageInfo' > bool< / a > < a href = '#SkBitmap_tryAllocN32Pixels' > tryAllocN32Pixels< / a > (< a href = '#SkBitmap_tryAllocN32Pixels' > int< / a > < a href = '#SkBitmap_tryAllocN32Pixels' > width< / a > , < a href = '#SkBitmap_tryAllocN32Pixels' > int< / a > < a href = '#SkBitmap_tryAllocN32Pixels' > height< / a > , < a href = '#SkBitmap_tryAllocN32Pixels' > bool< / a > < a href = '#SkBitmap_isOpaque' > isOpaque< / a > = < a href = '#SkBitmap_isOpaque' > false< / a > );
< a href = '#SkBitmap_isOpaque' > void< / a > < a href = '#SkBitmap_allocN32Pixels' > allocN32Pixels< / a > (< a href = '#SkBitmap_allocN32Pixels' > int< / a > < a href = '#SkBitmap_allocN32Pixels' > width< / a > , < a href = '#SkBitmap_allocN32Pixels' > int< / a > < a href = '#SkBitmap_allocN32Pixels' > height< / a > , < a href = '#SkBitmap_allocN32Pixels' > bool< / a > < a href = '#SkBitmap_isOpaque' > isOpaque< / a > = < a href = '#SkBitmap_isOpaque' > false< / a > );
< a href = '#SkBitmap_isOpaque' > bool< / a > < a href = '#SkBitmap_installPixels' > installPixels< / a > (< a href = '#SkBitmap_installPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > void< / a > * < a href = 'SkImageInfo_Reference#SkImageInfo' > pixels< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > ,
< a href = '#SkBitmap_rowBytes' > void< / a > (*< a href = '#SkBitmap_rowBytes' > releaseProc< / a > )(< a href = '#SkBitmap_rowBytes' > void< / a > * < a href = '#SkBitmap_rowBytes' > addr< / a > , < a href = '#SkBitmap_rowBytes' > void< / a > * < a href = '#SkBitmap_rowBytes' > context< / a > ), < a href = '#SkBitmap_rowBytes' > void< / a > * < a href = '#SkBitmap_rowBytes' > context< / a > );
< a href = '#SkBitmap_rowBytes' > bool< / a > < a href = '#SkBitmap_installPixels' > installPixels< / a > (< a href = '#SkBitmap_installPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > void< / a > * < a href = 'SkImageInfo_Reference#SkImageInfo' > pixels< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > );
< a href = '#SkBitmap_rowBytes' > bool< / a > < a href = '#SkBitmap_installPixels' > installPixels< / a > (< a href = '#SkBitmap_installPixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#Pixmap' > pixmap< / a > );
< a href = 'SkPixmap_Reference#Pixmap' > bool< / a > < a href = '#SkBitmap_installMaskPixels' > installMaskPixels< / a > (< a href = '#SkBitmap_installMaskPixels' > const< / a > < a href = 'undocumented#SkMask' > SkMask< / a > & < a href = 'undocumented#SkMask' > mask< / a > );
< a href = 'undocumented#SkMask' > void< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a > (< a href = '#SkBitmap_setPixels' > void< / a > * < a href = '#SkBitmap_setPixels' > pixels< / a > );
< a href = '#SkBitmap_setPixels' > bool< / a > < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > ();
< a href = '#SkBitmap_tryAllocPixels' > void< / a > < a href = '#SkBitmap_allocPixels' > allocPixels< / a > ();
< a href = '#SkBitmap_allocPixels' > bool< / a > < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > (< a href = '#SkBitmap_Allocator' > Allocator< / a > * < a href = '#SkBitmap_Allocator' > allocator< / a > );
< a href = '#SkBitmap_Allocator' > void< / a > < a href = '#SkBitmap_allocPixels' > allocPixels< / a > (< a href = '#SkBitmap_Allocator' > Allocator< / a > * < a href = '#SkBitmap_Allocator' > allocator< / a > );
< a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > * < a href = '#SkBitmap_pixelRef' > pixelRef< / a > () < a href = '#SkBitmap_pixelRef' > const< / a > ;
< a href = 'SkIPoint_Reference#SkIPoint' > SkIPoint< / a > < a href = '#SkBitmap_pixelRefOrigin' > pixelRefOrigin< / a > () < a href = '#SkBitmap_pixelRefOrigin' > const< / a > ;
< a href = '#SkBitmap_pixelRefOrigin' > void< / a > < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a > (< a href = 'undocumented#sk_sp' > sk_sp< / a > < < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > > < a href = '#SkBitmap_pixelRef' > pixelRef< / a > , < a href = '#SkBitmap_pixelRef' > int< / a > < a href = '#SkBitmap_pixelRef' > dx< / a > , < a href = '#SkBitmap_pixelRef' > int< / a > < a href = '#SkBitmap_pixelRef' > dy< / a > );
< a href = '#SkBitmap_pixelRef' > bool< / a > < a href = '#SkBitmap_readyToDraw' > readyToDraw< / a > () < a href = '#SkBitmap_readyToDraw' > const< / a > ;
< a href = '#SkBitmap_readyToDraw' > uint32_t< / a > < a href = '#SkBitmap_getGenerationID' > getGenerationID< / a > () < a href = '#SkBitmap_getGenerationID' > const< / a > ;
< a href = '#SkBitmap_getGenerationID' > void< / a > < a href = '#SkBitmap_notifyPixelsChanged' > notifyPixelsChanged< / a > () < a href = '#SkBitmap_notifyPixelsChanged' > const< / a > ;
< a href = '#SkBitmap_notifyPixelsChanged' > void< / a > < a href = '#SkBitmap_eraseColor' > eraseColor< / a > (< a href = 'SkColor_Reference#SkColor' > SkColor< / a > < a href = 'SkColor_Reference#SkColor' > c< / a > ) < a href = 'SkColor_Reference#SkColor' > const< / a > ;
< a href = 'SkColor_Reference#SkColor' > void< / a > < a href = '#SkBitmap_eraseARGB' > eraseARGB< / a > (< a href = 'undocumented#U8CPU' > U8CPU< / a > < a href = 'undocumented#U8CPU' > a< / a > , < a href = 'undocumented#U8CPU' > U8CPU< / a > < a href = 'undocumented#U8CPU' > r< / a > , < a href = 'undocumented#U8CPU' > U8CPU< / a > < a href = 'undocumented#U8CPU' > g< / a > , < a href = 'undocumented#U8CPU' > U8CPU< / a > < a href = 'undocumented#U8CPU' > b< / a > ) < a href = 'undocumented#U8CPU' > const< / a > ;
< a href = 'undocumented#U8CPU' > void< / a > < a href = '#SkBitmap_erase' > erase< / a > (< a href = 'SkColor_Reference#SkColor' > SkColor< / a > < a href = 'SkColor_Reference#SkColor' > c< / a > , < a href = 'SkColor_Reference#SkColor' > const< / a > < a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > & < a href = 'SkIRect_Reference#SkIRect' > area< / a > ) < a href = 'SkIRect_Reference#SkIRect' > const< / a > ;
< a href = 'SkIRect_Reference#SkIRect' > void< / a > < a href = '#SkBitmap_eraseArea' > eraseArea< / a > (< a href = '#SkBitmap_eraseArea' > const< / a > < a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > & < a href = 'SkIRect_Reference#SkIRect' > area< / a > , < a href = 'SkColor_Reference#SkColor' > SkColor< / a > < a href = 'SkColor_Reference#SkColor' > c< / a > ) < a href = 'SkColor_Reference#SkColor' > const< / a > ;
< a href = 'SkColor_Reference#SkColor' > SkColor< / a > < a href = '#SkBitmap_getColor' > getColor< / a > (< a href = '#SkBitmap_getColor' > int< / a > < a href = '#SkBitmap_getColor' > x< / a > , < a href = '#SkBitmap_getColor' > int< / a > < a href = '#SkBitmap_getColor' > y< / a > ) < a href = '#SkBitmap_getColor' > const< / a > ;
< a href = '#SkBitmap_getColor' > float< / a > < a href = '#SkBitmap_getAlphaf' > getAlphaf< / a > (< a href = '#SkBitmap_getAlphaf' > int< / a > < a href = '#SkBitmap_getAlphaf' > x< / a > , < a href = '#SkBitmap_getAlphaf' > int< / a > < a href = '#SkBitmap_getAlphaf' > y< / a > ) < a href = '#SkBitmap_getAlphaf' > const< / a > ;
< a href = '#SkBitmap_getAlphaf' > void< / a > * < a href = '#SkBitmap_getAddr' > getAddr< / a > (< a href = '#SkBitmap_getAddr' > int< / a > < a href = '#SkBitmap_getAddr' > x< / a > , < a href = '#SkBitmap_getAddr' > int< / a > < a href = '#SkBitmap_getAddr' > y< / a > ) < a href = '#SkBitmap_getAddr' > const< / a > ;
< a href = '#SkBitmap_getAddr' > uint32_t< / a > * < a href = '#SkBitmap_getAddr32' > getAddr32< / a > (< a href = '#SkBitmap_getAddr32' > int< / a > < a href = '#SkBitmap_getAddr32' > x< / a > , < a href = '#SkBitmap_getAddr32' > int< / a > < a href = '#SkBitmap_getAddr32' > y< / a > ) < a href = '#SkBitmap_getAddr32' > const< / a > ;
< a href = '#SkBitmap_getAddr32' > uint16_t< / a > * < a href = '#SkBitmap_getAddr16' > getAddr16< / a > (< a href = '#SkBitmap_getAddr16' > int< / a > < a href = '#SkBitmap_getAddr16' > x< / a > , < a href = '#SkBitmap_getAddr16' > int< / a > < a href = '#SkBitmap_getAddr16' > y< / a > ) < a href = '#SkBitmap_getAddr16' > const< / a > ;
< a href = '#SkBitmap_getAddr16' > uint8_t< / a > * < a href = '#SkBitmap_getAddr8' > getAddr8< / a > (< a href = '#SkBitmap_getAddr8' > int< / a > < a href = '#SkBitmap_getAddr8' > x< / a > , < a href = '#SkBitmap_getAddr8' > int< / a > < a href = '#SkBitmap_getAddr8' > y< / a > ) < a href = '#SkBitmap_getAddr8' > const< / a > ;
< a href = '#SkBitmap_getAddr8' > bool< / a > < a href = '#SkBitmap_extractSubset' > extractSubset< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#SkBitmap' > dst< / a > , < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > & < a href = 'SkIRect_Reference#SkIRect' > subset< / a > ) < a href = 'SkIRect_Reference#SkIRect' > const< / a > ;
< a href = 'SkIRect_Reference#SkIRect' > bool< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > (< a href = '#SkBitmap_readPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > dstInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > void< / a > * < a href = 'SkImageInfo_Reference#SkImageInfo' > dstPixels< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > dstRowBytes< / a > ,
< a href = 'SkImageInfo_Reference#SkImageInfo' > int< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > srcX< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > int< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > srcY< / a > ) < a href = 'SkImageInfo_Reference#SkImageInfo' > const< / a > ;
< a href = 'SkImageInfo_Reference#SkImageInfo' > bool< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > (< a href = '#SkBitmap_readPixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#SkPixmap' > dst< / a > , < a href = 'SkPixmap_Reference#SkPixmap' > int< / a > < a href = 'SkPixmap_Reference#SkPixmap' > srcX< / a > , < a href = 'SkPixmap_Reference#SkPixmap' > int< / a > < a href = 'SkPixmap_Reference#SkPixmap' > srcY< / a > ) < a href = 'SkPixmap_Reference#SkPixmap' > const< / a > ;
< a href = 'SkPixmap_Reference#SkPixmap' > bool< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > (< a href = '#SkBitmap_readPixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#SkPixmap' > dst< / a > ) < a href = 'SkPixmap_Reference#SkPixmap' > const< / a > ;
< a href = 'SkPixmap_Reference#SkPixmap' > bool< / a > < a href = '#SkBitmap_writePixels' > writePixels< / a > (< a href = '#SkBitmap_writePixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#SkPixmap' > src< / a > , < a href = 'SkPixmap_Reference#SkPixmap' > int< / a > < a href = 'SkPixmap_Reference#SkPixmap' > dstX< / a > , < a href = 'SkPixmap_Reference#SkPixmap' > int< / a > < a href = 'SkPixmap_Reference#SkPixmap' > dstY< / a > );
< a href = 'SkPixmap_Reference#SkPixmap' > bool< / a > < a href = '#SkBitmap_writePixels' > writePixels< / a > (< a href = '#SkBitmap_writePixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#SkPixmap' > src< / a > );
< a href = 'SkPixmap_Reference#SkPixmap' > bool< / a > < a href = '#SkBitmap_extractAlpha' > extractAlpha< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#SkBitmap' > dst< / a > ) < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > ;
< a href = 'SkBitmap_Reference#SkBitmap' > bool< / a > < a href = '#SkBitmap_extractAlpha' > extractAlpha< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#SkBitmap' > dst< / a > , < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkPaint_Reference#SkPaint' > SkPaint< / a > * < a href = 'SkPaint_Reference#Paint' > paint< / a > ,
< a href = 'SkIPoint_Reference#SkIPoint' > SkIPoint< / a > * < a href = 'SkIPoint_Reference#SkIPoint' > offset< / a > ) < a href = 'SkIPoint_Reference#SkIPoint' > const< / a > ;
< a href = 'SkIPoint_Reference#SkIPoint' > bool< / a > < a href = '#SkBitmap_extractAlpha' > extractAlpha< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#SkBitmap' > dst< / a > , < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkPaint_Reference#SkPaint' > SkPaint< / a > * < a href = 'SkPaint_Reference#Paint' > paint< / a > , < a href = '#SkBitmap_Allocator' > Allocator< / a > * < a href = '#SkBitmap_Allocator' > allocator< / a > ,
< a href = 'SkIPoint_Reference#SkIPoint' > SkIPoint< / a > * < a href = 'SkIPoint_Reference#SkIPoint' > offset< / a > ) < a href = 'SkIPoint_Reference#SkIPoint' > const< / a > ;
< a href = 'SkIPoint_Reference#SkIPoint' > bool< / a > < a href = '#SkBitmap_peekPixels' > peekPixels< / a > (< a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > * < a href = 'SkPixmap_Reference#Pixmap' > pixmap< / a > ) < a href = 'SkPixmap_Reference#Pixmap' > const< / a > ;
< a href = 'SkPixmap_Reference#Pixmap' > void< / a > < a href = '#SkBitmap_validate' > validate()< / a > < a href = '#SkBitmap_validate' > const< / a > ;
< a href = '#SkBitmap_validate' > class< / a > < a href = '#SkBitmap_Allocator' > Allocator< / a > : < a href = '#SkBitmap_Allocator' > public< / a > < a href = 'undocumented#SkRefCnt' > SkRefCnt< / a > {
< a href = 'undocumented#SkRefCnt' > public< / a > :
< a href = 'undocumented#SkRefCnt' > virtual< / a > < a href = 'undocumented#SkRefCnt' > bool< / a > < a href = 'undocumented#SkRefCnt' > allocPixelRef< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > ) = 0;
2018-10-08 18:57:48 +00:00
};
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#Bitmap' > class< / a > < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > : < a href = '#SkBitmap_HeapAllocator' > public< / a > < a href = '#SkBitmap_Allocator' > Allocator< / a > {
< a href = '#SkBitmap_Allocator' > public< / a > :
< a href = '#SkBitmap_Allocator' > bool< / a > < a href = '#SkBitmap_Allocator' > allocPixelRef< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > ) < a href = 'SkBitmap_Reference#Bitmap' > override< / a > ;
2018-10-08 18:57:48 +00:00
};
};
< / pre >
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > describes< / a > < a href = 'SkBitmap_Reference#Bitmap' > a< / a > < a href = 'SkBitmap_Reference#Bitmap' > two-dimensional< / a > < a href = 'SkBitmap_Reference#Bitmap' > raster< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > array< / a > . < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > is< / a > < a href = 'SkBitmap_Reference#Bitmap' > built< / a > < a href = 'SkBitmap_Reference#Bitmap' > on< / a >
< a href = '#Image_Info' > Image_Info< / a > , < a href = '#Image_Info' > containing< / a > < a href = '#Image_Info' > integer< / a > < a href = '#Image_Info' > width< / a > < a href = '#Image_Info' > and< / a > < a href = '#Image_Info' > height< / a > , < a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = '#Image_Info_Color_Type' > and< / a > < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a >
< a href = '#Image_Info_Alpha_Type' > describing< / a > < a href = '#Image_Info_Alpha_Type' > the< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > format< / a > , < a href = 'undocumented#Pixel' > and< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > describing< / a > < a href = '#Color_Space' > the< / a > < a href = '#Color_Space' > range< / a > < a href = '#Color_Space' > of< / a > < a href = '#Color_Space' > colors< / a > .
< a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkPoint_Reference#Point' > points< / a > < a href = 'SkPoint_Reference#Point' > to< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a > , < a href = '#Pixel_Ref' > which< / a > < a href = '#Pixel_Ref' > describes< / a > < a href = '#Pixel_Ref' > the< / a > < a href = '#Pixel_Ref' > physical< / a > < a href = '#Pixel_Ref' > array< / a > < a href = '#Pixel_Ref' > of< / a > < a href = '#Pixel_Ref' > pixels< / a > .
< a href = '#Image_Info' > Image_Info< / a > < a href = '#Image_Info' > bounds< / a > < a href = '#Image_Info' > may< / a > < a href = '#Image_Info' > be< / a > < a href = '#Image_Info' > located< / a > < a href = '#Image_Info' > anywhere< / a > < a href = '#Image_Info' > fully< / a > < a href = '#Image_Info' > inside< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > bounds< / a > .
2018-02-01 14:37:32 +00:00
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > can< / a > < a href = 'SkBitmap_Reference#Bitmap' > be< / a > < a href = 'SkBitmap_Reference#Bitmap' > drawn< / a > < a href = 'SkBitmap_Reference#Bitmap' > using< / a > < a href = 'SkCanvas_Reference#Canvas' > Canvas< / a > . < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > can< / a > < a href = 'SkBitmap_Reference#Bitmap' > be< / a > < a href = 'SkBitmap_Reference#Bitmap' > a< / a > < a href = 'SkBitmap_Reference#Bitmap' > drawing< / a > < a href = 'SkBitmap_Reference#Bitmap' > destination< / a > < a href = 'SkBitmap_Reference#Bitmap' > for< / a > < a href = 'SkCanvas_Reference#Canvas' > Canvas< / a >
< a href = 'SkCanvas_Reference#Canvas' > draw< / a > < a href = 'SkCanvas_Reference#Canvas' > member< / a > < a href = 'SkCanvas_Reference#Canvas' > functions< / a > . < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > flexibility< / a > < a href = 'SkBitmap_Reference#Bitmap' > as< / a > < a href = 'SkBitmap_Reference#Bitmap' > a< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > container< / a > < a href = 'undocumented#Pixel' > limits< / a > < a href = 'undocumented#Pixel' > some< / a >
< a href = 'undocumented#Pixel' > optimizations< / a > < a href = 'undocumented#Pixel' > available< / a > < a href = 'undocumented#Pixel' > to< / a > < a href = 'undocumented#Pixel' > the< / a > < a href = 'undocumented#Pixel' > target< / a > < a href = 'undocumented#Pixel' > platform< / a > .
2018-02-01 14:37:32 +00:00
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#Pixel' > If< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > array< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > primarily< / a > < a href = 'undocumented#Pixel' > read-only< / a > , < a href = 'undocumented#Pixel' > use< / a > < a href = 'SkImage_Reference#Image' > Image< / a > < a href = 'SkImage_Reference#Image' > for< / a > < a href = 'SkImage_Reference#Image' > better< / a > < a href = 'SkImage_Reference#Image' > performance< / a > .
< a href = 'SkImage_Reference#Image' > If< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > array< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > primarily< / a > < a href = 'undocumented#Pixel' > written< / a > < a href = 'undocumented#Pixel' > to< / a > , < a href = 'undocumented#Pixel' > use< / a > < a href = 'SkSurface_Reference#Surface' > Surface< / a > < a href = 'SkSurface_Reference#Surface' > for< / a > < a href = 'SkSurface_Reference#Surface' > better< / a > < a href = 'SkSurface_Reference#Surface' > performance< / a > .
2018-02-01 14:37:32 +00:00
2018-11-07 19:59:03 +00:00
< a href = 'SkSurface_Reference#Surface' > Declaring< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkBitmap_Reference#SkBitmap' > prevents< / a > < a href = 'SkBitmap_Reference#SkBitmap' > altering< / a > < a href = '#Image_Info' > Image_Info< / a > : < a href = '#Image_Info' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > height< / a > , < a href = 'SkBitmap_Reference#Bitmap' > width< / a > ,
< a href = 'SkBitmap_Reference#Bitmap' > and< / a > < a href = 'SkBitmap_Reference#Bitmap' > so< / a > < a href = 'SkBitmap_Reference#Bitmap' > on< / a > < a href = 'SkBitmap_Reference#Bitmap' > cannot< / a > < a href = 'SkBitmap_Reference#Bitmap' > change< / a > . < a href = 'SkBitmap_Reference#Bitmap' > It< / a > < a href = 'SkBitmap_Reference#Bitmap' > does< / a > < a href = 'SkBitmap_Reference#Bitmap' > not< / a > < a href = 'SkBitmap_Reference#Bitmap' > affect< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a > : < a href = '#Pixel_Ref' > a< / a > < a href = '#Pixel_Ref' > caller< / a > < a href = '#Pixel_Ref' > may< / a > < a href = '#Pixel_Ref' > write< / a > < a href = '#Pixel_Ref' > its< / a >
< a href = '#Pixel_Ref' > pixels< / a > . < a href = '#Pixel_Ref' > Declaring< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkBitmap_Reference#SkBitmap' > affects< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > configuration< / a > , < a href = 'SkBitmap_Reference#Bitmap' > not< / a > < a href = 'SkBitmap_Reference#Bitmap' > its< / a > < a href = 'SkBitmap_Reference#Bitmap' > contents< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > is< / a > < a href = 'SkBitmap_Reference#Bitmap' > not< / a > < a href = 'SkBitmap_Reference#Bitmap' > thread< / a > < a href = 'SkBitmap_Reference#Bitmap' > safe< / a > . < a href = 'SkBitmap_Reference#Bitmap' > Each< / a > < a href = 'SkBitmap_Reference#Bitmap' > thread< / a > < a href = 'SkBitmap_Reference#Bitmap' > must< / a > < a href = 'SkBitmap_Reference#Bitmap' > have< / a > < a href = 'SkBitmap_Reference#Bitmap' > its< / a > < a href = 'SkBitmap_Reference#Bitmap' > own< / a > < a href = 'SkBitmap_Reference#Bitmap' > copy< / a > < a href = 'SkBitmap_Reference#Bitmap' > of< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > fields< / a > ,
< a href = 'SkBitmap_Reference#Bitmap' > although< / a > < a href = 'SkBitmap_Reference#Bitmap' > threads< / a > < a href = 'SkBitmap_Reference#Bitmap' > may< / a > < a href = 'SkBitmap_Reference#Bitmap' > share< / a > < a href = 'SkBitmap_Reference#Bitmap' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > underlying< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > array< / a > .
2017-10-04 18:31:33 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Row_Bytes' > < / a >
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > pixels< / a > < a href = 'SkBitmap_Reference#Bitmap' > may< / a > < a href = 'SkBitmap_Reference#Bitmap' > be< / a > < a href = 'SkBitmap_Reference#Bitmap' > contiguous< / a > , < a href = 'SkBitmap_Reference#Bitmap' > or< / a > < a href = 'SkBitmap_Reference#Bitmap' > may< / a > < a href = 'SkBitmap_Reference#Bitmap' > have< / a > < a href = 'SkBitmap_Reference#Bitmap' > a< / a > < a href = 'SkBitmap_Reference#Bitmap' > gap< / a > < a href = 'SkBitmap_Reference#Bitmap' > at< / a > < a href = 'SkBitmap_Reference#Bitmap' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > end< / a > < a href = 'SkBitmap_Reference#Bitmap' > of< / a > < a href = 'SkBitmap_Reference#Bitmap' > each< / a > < a href = 'SkBitmap_Reference#Bitmap' > row< / a > .
< a href = '#Bitmap_Row_Bytes' > Row_Bytes< / a > < a href = '#Bitmap_Row_Bytes' > is< / a > < a href = '#Bitmap_Row_Bytes' > the< / a > < a href = '#Bitmap_Row_Bytes' > interval< / a > < a href = '#Bitmap_Row_Bytes' > from< / a > < a href = '#Bitmap_Row_Bytes' > one< / a > < a href = '#Bitmap_Row_Bytes' > row< / a > < a href = '#Bitmap_Row_Bytes' > to< / a > < a href = '#Bitmap_Row_Bytes' > the< / a > < a href = '#Bitmap_Row_Bytes' > next< / a > . < a href = '#Bitmap_Row_Bytes' > Row_Bytes< / a > < a href = '#Bitmap_Row_Bytes' > may< / a > < a href = '#Bitmap_Row_Bytes' > be< / a > < a href = '#Bitmap_Row_Bytes' > specified< / a > ;
< a href = '#Bitmap_Row_Bytes' > sometimes< / a > < a href = '#Bitmap_Row_Bytes' > passing< / a > < a href = '#Bitmap_Row_Bytes' > zero< / a > < a href = '#Bitmap_Row_Bytes' > will< / a > < a href = '#Bitmap_Row_Bytes' > compute< / a > < a href = '#Bitmap_Row_Bytes' > the< / a > < a href = '#Bitmap_Row_Bytes' > Row_Bytes< / a > < a href = '#Bitmap_Row_Bytes' > from< / a > < a href = '#Bitmap_Row_Bytes' > the< / a > < a href = '#Bitmap_Row_Bytes' > row< / a > < a href = '#Bitmap_Row_Bytes' > width< / a > < a href = '#Bitmap_Row_Bytes' > and< / a > < a href = '#Bitmap_Row_Bytes' > the< / a >
< a href = '#Bitmap_Row_Bytes' > number< / a > < a href = '#Bitmap_Row_Bytes' > of< / a > < a href = '#Bitmap_Row_Bytes' > bytes< / a > < a href = '#Bitmap_Row_Bytes' > in< / a > < a href = '#Bitmap_Row_Bytes' > a< / a > < a href = 'undocumented#Pixel' > pixel< / a > . < a href = '#Bitmap_Row_Bytes' > Row_Bytes< / a > < a href = '#Bitmap_Row_Bytes' > may< / a > < a href = '#Bitmap_Row_Bytes' > be< / a > < a href = '#Bitmap_Row_Bytes' > larger< / a > < a href = '#Bitmap_Row_Bytes' > than< / a > < a href = '#Bitmap_Row_Bytes' > the< / a > < a href = '#Bitmap_Row_Bytes' > row< / a > < a href = '#Bitmap_Row_Bytes' > requires< / a > . < a href = '#Bitmap_Row_Bytes' > This< / a >
< a href = '#Bitmap_Row_Bytes' > is< / a > < a href = '#Bitmap_Row_Bytes' > useful< / a > < a href = '#Bitmap_Row_Bytes' > to< / a > < a href = '#Bitmap_Row_Bytes' > position< / a > < a href = '#Bitmap_Row_Bytes' > one< / a > < a href = '#Bitmap_Row_Bytes' > or< / a > < a href = '#Bitmap_Row_Bytes' > more< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmaps< / a > < a href = 'SkBitmap_Reference#Bitmap' > within< / a > < a href = 'SkBitmap_Reference#Bitmap' > a< / a > < a href = 'SkBitmap_Reference#Bitmap' > shared< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > array< / a > .
2018-10-16 14:30:28 +00:00
2018-10-08 18:57:48 +00:00
< a name = 'SkBitmap_Allocator' > < / a >
2017-10-04 18:31:33 +00:00
2018-10-16 14:30:28 +00:00
---
2017-11-27 15:44:06 +00:00
< pre style = "padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
class < a href = '#SkBitmap_Allocator' > Allocator< / a > : < a href = '#SkBitmap_Allocator' > public< / a > < a href = 'undocumented#SkRefCnt' > SkRefCnt< / a > {
< a href = 'undocumented#SkRefCnt' > public< / a > :
< a href = 'undocumented#SkRefCnt' > virtual< / a > < a href = 'undocumented#SkRefCnt' > bool< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > allocPixelRef< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > ) = 0;
2018-04-03 12:43:27 +00:00
};
2018-03-05 18:26:16 +00:00
< / pre >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
Abstract subclass of < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > .
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_Allocator_allocPixelRef' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
virtual bool < a href = '#SkBitmap_Allocator_allocPixelRef' > allocPixelRef< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > ) = 0
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Allocates the < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > for< / a > < a href = 'undocumented#Pixel' > the< / a > < a href = '#SkBitmap_Allocator_allocPixelRef_bitmap' > bitmap< / a > , < a href = '#SkBitmap_Allocator_allocPixelRef_bitmap' > given< / a > < a href = '#SkBitmap_Allocator_allocPixelRef_bitmap' > its< / a > < a href = '#SkBitmap_Allocator_allocPixelRef_bitmap' > dimensions< / a > < a href = '#SkBitmap_Allocator_allocPixelRef_bitmap' > and< / a >
< a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > . < a href = 'SkImageInfo_Reference#SkColorType' > Returns< / a > < a href = 'SkImageInfo_Reference#SkColorType' > true< / a > < a href = 'SkImageInfo_Reference#SkColorType' > on< / a > < a href = 'SkImageInfo_Reference#SkColorType' > success< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > where< / a > < a href = 'SkImageInfo_Reference#SkColorType' > success< / a > < a href = 'SkImageInfo_Reference#SkColorType' > means< / a > < a href = 'SkImageInfo_Reference#SkColorType' > either< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a > ()
or < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a > () < a href = '#SkBitmap_setPixelRef' > was< / a > < a href = '#SkBitmap_setPixelRef' > called< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_Allocator_allocPixelRef_bitmap' > < code > < strong > bitmap< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > containing< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > as< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > input< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > as< / a > < a href = 'undocumented#SkPixelRef' > output< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > was< / a > < a href = 'undocumented#SkPixelRef' > allocated< / a >
2017-10-04 18:31:33 +00:00
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a >
2017-10-04 18:31:33 +00:00
2018-10-08 18:57:48 +00:00
< a name = 'SkBitmap_HeapAllocator' > < / a >
2018-05-16 11:07:07 +00:00
2018-10-16 14:30:28 +00:00
---
2017-11-27 15:44:06 +00:00
< pre style = "padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
class < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > : < a href = '#SkBitmap_HeapAllocator' > public< / a > < a href = '#SkBitmap_Allocator' > Allocator< / a > {
< a href = '#SkBitmap_Allocator' > public< / a > :
< a href = '#SkBitmap_Allocator' > bool< / a > < a href = '#SkBitmap_HeapAllocator_allocPixelRef' > allocPixelRef< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > ) < a href = 'SkBitmap_Reference#Bitmap' > override< / a > ;
2018-04-03 12:43:27 +00:00
};
2018-03-05 18:26:16 +00:00
< / pre >
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Subclass of < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > ::< a href = '#SkBitmap_Allocator' > Allocator< / a > < a href = '#SkBitmap_Allocator' > that< / a > < a href = '#SkBitmap_Allocator' > returns< / a > < a href = '#SkBitmap_Allocator' > a< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > that< / a > < a href = '#Pixel_Ref' > allocates< / a > < a href = '#Pixel_Ref' > its< / a > < a href = 'undocumented#Pixel' > pixel< / a >
< a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > from< / a > < a href = 'undocumented#Pixel' > the< / a > < a href = 'undocumented#Pixel' > heap< / a > . < a href = 'undocumented#Pixel' > This< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > the< / a > < a href = 'undocumented#Pixel' > default< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > ::< a href = '#SkBitmap_Allocator' > Allocator< / a > < a href = '#SkBitmap_Allocator' > invoked< / a > < a href = '#SkBitmap_Allocator' > by< / a >
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_allocPixels' > allocPixels< / a > .
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_HeapAllocator_allocPixelRef' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_HeapAllocator_allocPixelRef' > allocPixelRef< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > ) < a href = 'SkBitmap_Reference#Bitmap' > override< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Allocates the < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > for< / a > < a href = 'undocumented#Pixel' > the< / a > < a href = '#SkBitmap_HeapAllocator_allocPixelRef_bitmap' > bitmap< / a > , < a href = '#SkBitmap_HeapAllocator_allocPixelRef_bitmap' > given< / a > < a href = '#SkBitmap_HeapAllocator_allocPixelRef_bitmap' > its< / a > < a href = '#SkBitmap_HeapAllocator_allocPixelRef_bitmap' > dimensions< / a > < a href = '#SkBitmap_HeapAllocator_allocPixelRef_bitmap' > and< / a >
< a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > . < a href = 'SkImageInfo_Reference#SkColorType' > Returns< / a > < a href = 'SkImageInfo_Reference#SkColorType' > true< / a > < a href = 'SkImageInfo_Reference#SkColorType' > on< / a > < a href = 'SkImageInfo_Reference#SkColorType' > success< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > where< / a > < a href = 'SkImageInfo_Reference#SkColorType' > success< / a > < a href = 'SkImageInfo_Reference#SkColorType' > means< / a > < a href = 'SkImageInfo_Reference#SkColorType' > either< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a > ()
or < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a > () < a href = '#SkBitmap_setPixelRef' > was< / a > < a href = '#SkBitmap_setPixelRef' > called< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_HeapAllocator_allocPixelRef_bitmap' > < code > < strong > bitmap< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > containing< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > as< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > input< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > as< / a > < a href = 'undocumented#SkPixelRef' > output< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
true if pixels are allocated
### Example
< div > < fiddle-embed name = "fe79a9c1ec350264eb9c7b2509dd3638" >
#### Example Output
~~~~
2017-10-11 14:37:52 +00:00
#Volatile
2017-10-04 18:31:33 +00:00
pixel address = (nil)
pixel address = 0x560ddd0ac670
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > ::< a href = '#SkBitmap_Allocator' > Allocator< / a > < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_empty_constructor' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_empty_constructor' > SkBitmap()< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Creates an empty < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > without< / a > < a href = 'SkBitmap_Reference#SkBitmap' > pixels< / a > , < a href = 'SkBitmap_Reference#SkBitmap' > with< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > and< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > with< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > a< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > width< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > and< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > height< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > of< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > zero< / a > . < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > origin< / a > < a href = 'undocumented#SkPixelRef' > is< / a >
set to (0, 0). < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > is< / a > < a href = 'SkBitmap_Reference#SkBitmap' > not< / a > < a href = 'SkBitmap_Reference#SkBitmap' > volatile< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Use < a href = '#SkBitmap_setInfo' > setInfo< / a > () < a href = '#SkBitmap_setInfo' > to< / a > < a href = '#SkBitmap_setInfo' > associate< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkAlphaType' > width< / a > , < a href = 'SkImageInfo_Reference#SkAlphaType' > and< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > height< / a >
after < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > has< / a > < a href = 'SkBitmap_Reference#SkBitmap' > been< / a > < a href = 'SkBitmap_Reference#SkBitmap' > created< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-10-31 16:14:03 +00:00
empty < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-01-30 15:08:57 +00:00
< div > < fiddle-embed name = "6739d14ec0d6a373f2fcadc6b3077fd4" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
width: 0 height: 0 color: kUnknown_SkColorType alpha: kUnknown_SkAlphaType
width: 25 height: 35 color: kRGBA_8888_SkColorType alpha: kOpaque_SkAlphaType
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_setInfo' > setInfo< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_copy_const_SkBitmap' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > src< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies settings from < a href = '#SkBitmap_copy_const_SkBitmap_src' > src< / a > < a href = '#SkBitmap_copy_const_SkBitmap_src' > to< / a > < a href = '#SkBitmap_copy_const_SkBitmap_src' > returned< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > Shares< / a > < a href = 'SkBitmap_Reference#SkBitmap' > pixels< / a > < a href = 'SkBitmap_Reference#SkBitmap' > if< / a > < a href = '#SkBitmap_copy_const_SkBitmap_src' > src< / a > < a href = '#SkBitmap_copy_const_SkBitmap_src' > has< / a > < a href = '#SkBitmap_copy_const_SkBitmap_src' > pixels< / a >
allocated, so both < a href = 'SkBitmap_Reference#Bitmap' > bitmaps< / a > < a href = 'SkBitmap_Reference#Bitmap' > reference< / a > < a href = 'SkBitmap_Reference#Bitmap' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > same< / a > < a href = 'SkBitmap_Reference#Bitmap' > pixels< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_copy_const_SkBitmap_src' > < code > < strong > src< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > copy< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > share< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
copy of < a href = '#SkBitmap_copy_const_SkBitmap_src' > src< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "bbbae7a181bfd128a4484e8e9f454db1" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
original has pixels before copy: true
original has pixels after copy: true
copy has pixels: true
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_setInfo' > setInfo< / a > < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a > < a href = '#SkBitmap_swap' > swap< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_move_SkBitmap' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & & < a href = 'SkBitmap_Reference#SkBitmap' > src< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies settings from < a href = '#SkBitmap_move_SkBitmap_src' > src< / a > < a href = '#SkBitmap_move_SkBitmap_src' > to< / a > < a href = '#SkBitmap_move_SkBitmap_src' > returned< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > Moves< / a > < a href = 'SkBitmap_Reference#SkBitmap' > ownership< / a > < a href = 'SkBitmap_Reference#SkBitmap' > of< / a > < a href = '#SkBitmap_move_SkBitmap_src' > src< / a > < a href = '#SkBitmap_move_SkBitmap_src' > pixels< / a > < a href = '#SkBitmap_move_SkBitmap_src' > to< / a >
2018-10-31 16:14:03 +00:00
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_move_SkBitmap_src' > < code > < strong > src< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > copy< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > reassign< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
copy of < a href = '#SkBitmap_move_SkBitmap_src' > src< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "40afd4f1fa69e02d69d92b38252088ef" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
original has pixels before move: true
original has pixels after move: false
copy has pixels: true
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_setInfo' > setInfo< / a > < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a > < a href = '#SkBitmap_swap' > swap< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_destructor' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
~< a href = '#SkBitmap_empty_constructor' > SkBitmap()< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Decrements < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > reference< / a > < a href = 'undocumented#SkPixelRef' > count< / a > , < a href = 'undocumented#SkPixelRef' > if< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > not< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > .
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#Pixel_Ref' > Pixel_Ref< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_copy_operator' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > operator< / a > =(< a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > src< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies settings from < a href = '#SkBitmap_copy_operator_src' > src< / a > < a href = '#SkBitmap_copy_operator_src' > to< / a > < a href = '#SkBitmap_copy_operator_src' > returned< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > Shares< / a > < a href = 'SkBitmap_Reference#SkBitmap' > pixels< / a > < a href = 'SkBitmap_Reference#SkBitmap' > if< / a > < a href = '#SkBitmap_copy_operator_src' > src< / a > < a href = '#SkBitmap_copy_operator_src' > has< / a > < a href = '#SkBitmap_copy_operator_src' > pixels< / a >
allocated, so both < a href = 'SkBitmap_Reference#Bitmap' > bitmaps< / a > < a href = 'SkBitmap_Reference#Bitmap' > reference< / a > < a href = 'SkBitmap_Reference#Bitmap' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > same< / a > < a href = 'SkBitmap_Reference#Bitmap' > pixels< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_copy_operator_src' > < code > < strong > src< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > copy< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > share< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
copy of < a href = '#SkBitmap_copy_operator_src' > src< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "45279c519ae808f78bd30e9d84bdfdde" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
original has pixels before copy: true
original has pixels after copy: true
copy has pixels: true
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_setInfo' > setInfo< / a > < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a > < a href = '#SkBitmap_swap' > swap< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_move_operator' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > operator< / a > =(< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & & < a href = 'SkBitmap_Reference#SkBitmap' > src< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies settings from < a href = '#SkBitmap_move_operator_src' > src< / a > < a href = '#SkBitmap_move_operator_src' > to< / a > < a href = '#SkBitmap_move_operator_src' > returned< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > Moves< / a > < a href = 'SkBitmap_Reference#SkBitmap' > ownership< / a > < a href = 'SkBitmap_Reference#SkBitmap' > of< / a > < a href = '#SkBitmap_move_operator_src' > src< / a > < a href = '#SkBitmap_move_operator_src' > pixels< / a > < a href = '#SkBitmap_move_operator_src' > to< / a >
2018-10-31 16:14:03 +00:00
< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_move_operator_src' > < code > < strong > src< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > copy< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > reassign< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
copy of < a href = '#SkBitmap_move_operator_src' > src< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-11 05:28:17 +00:00
< div > < fiddle-embed name = "35ea3fed27d8db22dc00f48670de64de" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
original has pixels before move: true
original has pixels after move: false
copy has pixels: true
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_setInfo' > setInfo< / a > < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a > < a href = '#SkBitmap_swap' > swap< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_swap' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_swap' > swap< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > other< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-10-31 16:14:03 +00:00
Swaps the fields of the two < a href = 'SkBitmap_Reference#Bitmap' > bitmaps< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_swap_other' > < code > < strong > other< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > exchanged< / a > < a href = 'SkBitmap_Reference#SkBitmap' > with< / a > < a href = 'SkBitmap_Reference#SkBitmap' > original< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
2018-03-16 15:34:15 +00:00
< div > < fiddle-embed name = "de9be45255e48fae445c916a41063abc" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
one width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaType
two width:2 height:2 colorType:kBGRA_8888_SkColorType alphaType:kPremul_SkAlphaType
one width:2 height:2 colorType:kBGRA_8888_SkColorType alphaType:kPremul_SkAlphaType
two width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaType
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_move_SkBitmap' > SkBitmap(SkBitmap& & src)< / a > SkBitmap(SkBitmap& & src)< a href = '#SkBitmap_move_operator' > operator=(SkBitmap& & src)< / a >
2018-05-16 11:07:07 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Property' > < / a >
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_pixmap' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-12-15 16:21:51 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
const < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = '#SkBitmap_pixmap' > pixmap()< / a > < a href = '#SkBitmap_pixmap' > const< / a >
2017-12-15 16:21:51 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns a constant reference to the < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > < a href = 'SkPixmap_Reference#SkPixmap' > holding< / a > < a href = 'SkPixmap_Reference#SkPixmap' > the< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'undocumented#Pixel' > pixel< / a >
address, row bytes, and < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > .
2017-12-15 16:21:51 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
reference to < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > < a href = 'SkPixmap_Reference#SkPixmap' > describing< / a > < a href = 'SkPixmap_Reference#SkPixmap' > this< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a >
2017-12-15 16:21:51 +00:00
### Example
2018-01-11 15:35:44 +00:00
< div > < fiddle-embed name = "7f972d742dd78d2500034d8867e9ef2f" >
2017-12-15 16:21:51 +00:00
#### Example Output
~~~~
----------
---xx-----
--x--x----
--x-------
--xx------
--x-x---x-
-x---x--x-
-x----xx--
-xx---x---
--xxxx-xx-
----------
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_peekPixels' > peekPixels< / a > < a href = '#SkBitmap_installPixels' > installPixels< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > < a href = '#SkBitmap_writePixels' > writePixels< / a >
2017-12-15 16:21:51 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_info' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
const < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = '#SkBitmap_info' > info()< / a > < a href = '#SkBitmap_info' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > and< / a > < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-10-31 16:14:03 +00:00
reference to < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-09 05:28:19 +00:00
< div > < fiddle-embed name = "ec47c4dc23e2925ad565eaba55a91553" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
width: 56 height: 56 color: BGRA_8888 alpha: Opaque
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#Image_Info' > Image_Info< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_width' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
int < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > count< / a > < a href = 'undocumented#Pixel' > in< / a > < a href = 'undocumented#Pixel' > each< / a > < a href = 'undocumented#Pixel' > row< / a > . < a href = 'undocumented#Pixel' > Should< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > equal< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > less< / a > < a href = 'undocumented#Pixel' > than< / a >
< code > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > () / < a href = '#SkBitmap_info' > info()< / a > .< a href = '#SkImageInfo_bytesPerPixel' > bytesPerPixel< / a > ()< / code > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
May be less than < a href = '#SkBitmap_pixelRef' > pixelRef< / a > ().< a href = '#SkPixelRef_width' > width()< / a > . < a href = '#SkPixelRef_width' > Will< / a > < a href = '#SkPixelRef_width' > not< / a > < a href = '#SkPixelRef_width' > exceed< / a > < a href = '#SkBitmap_pixelRef' > pixelRef< / a > ().< a href = '#SkPixelRef_width' > width()< / a > < a href = '#SkPixelRef_width' > less< / a >
< a href = '#SkBitmap_pixelRefOrigin' > pixelRefOrigin< / a > ().< a href = '#SkIPoint_fX' > fX< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > width< / a > < a href = 'undocumented#Pixel' > in< / a > < a href = '#Image_Info' > Image_Info< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "d06880c42f8bb3b4c3b67bd988046049" >
#### Example Output
~~~~
bitmap width: 16 info width: 16
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_height' > height()< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > ::< a href = '#SkPixelRef_width' > width()< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_width' > width()< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_height' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
int < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a > < a href = 'undocumented#Pixel' > count< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Maybe be less than < a href = '#SkBitmap_pixelRef' > pixelRef< / a > ().< a href = '#SkPixelRef_height' > height()< / a > . < a href = '#SkPixelRef_height' > Will< / a > < a href = '#SkPixelRef_height' > not< / a > < a href = '#SkPixelRef_height' > exceed< / a > < a href = '#SkBitmap_pixelRef' > pixelRef< / a > ().< a href = '#SkPixelRef_height' > height()< / a > < a href = '#SkPixelRef_height' > less< / a >
2018-10-31 16:14:03 +00:00
< a href = '#SkBitmap_pixelRefOrigin' > pixelRefOrigin< / a > ().< a href = '#SkIPoint_fY' > fY< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > height< / a > < a href = 'undocumented#Pixel' > in< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "c79a196278c58b34cd5f551b0124ecc9" >
#### Example Output
~~~~
bitmap height: 32 info height: 32
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_width' > width()< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > ::< a href = '#SkPixelRef_height' > height()< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_height' > height()< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_colorType' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Image_Info_Color_Type' > one< / a > < a href = '#Image_Info_Color_Type' > of< / a > : < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > ,
2018-05-16 11:07:07 +00:00
< a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > kARGB_4444_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > kRGBA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_888x_SkColorType' > kRGB_888x_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > kBGRA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_1010102_SkColorType' > kRGBA_1010102_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_101010x_SkColorType' > kRGB_101010x_SkColorType< / a > ,
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > kRGBA_F16_SkColorType< / a >
.
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = '#Image_Info_Color_Type' > in< / a > < a href = '#Image_Info' > Image_Info< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-16 05:29:00 +00:00
< div > < fiddle-embed name = "ceb77fab7326b57822a147b04aa0960e" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
2018-01-30 15:08:57 +00:00
color type: kAlpha_8_SkColorType
2017-10-04 18:31:33 +00:00
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_alphaType' > alphaType< / a > () < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_colorType' > colorType< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_alphaType' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > () < a href = '#SkBitmap_alphaType' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Image_Info_Alpha_Type' > one< / a > < a href = '#Image_Info_Alpha_Type' > of< / a > : < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kPremul_SkAlphaType' > kPremul_SkAlphaType< / a > ,
< a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > kUnpremul_SkAlphaType< / a >
.
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > < a href = '#Image_Info_Alpha_Type' > in< / a > < a href = '#Image_Info' > Image_Info< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "070b1a60232be499eb10c6ea62371804" >
#### Example Output
~~~~
alpha type: kPremul_SkAlphaType
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_colorType' > colorType< / a > () < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_alphaType' > alphaType< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_colorSpace' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > * < a href = '#SkBitmap_colorSpace' > colorSpace< / a > () < a href = '#SkBitmap_colorSpace' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > , < a href = 'undocumented#SkColorSpace' > the< / a > < a href = 'undocumented#SkColorSpace' > range< / a > < a href = 'undocumented#SkColorSpace' > of< / a > < a href = 'undocumented#SkColorSpace' > colors< / a > , < a href = 'undocumented#SkColorSpace' > associated< / a > < a href = 'undocumented#SkColorSpace' > with< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > . < a href = 'SkImageInfo_Reference#SkImageInfo' > The< / a >
reference count of < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < a href = 'undocumented#SkColorSpace' > is< / a > < a href = 'undocumented#SkColorSpace' > unchanged< / a > . < a href = 'undocumented#SkColorSpace' > The< / a > < a href = 'undocumented#SkColorSpace' > returned< / a > < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < a href = 'undocumented#SkColorSpace' > is< / a >
2017-10-04 18:31:33 +00:00
immutable.
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < a href = 'undocumented#SkColorSpace' > in< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > nullptr< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "817f95879fadba44baf87ea60e9b595a" > < div > < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > ::< a href = '#SkColorSpace_MakeSRGBLinear' > MakeSRGBLinear< / a > < a href = '#SkColorSpace_MakeSRGBLinear' > creates< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > with< / a > < a href = '#Color_Space' > linear< / a > < a href = '#Color_Space' > gamma< / a >
< a href = '#Color_Space' > and< / a > < a href = '#Color_Space' > an< / a > < a href = '#Color_Space' > sRGB< / a > < a href = '#Color_Space' > gamut< / a > . < a href = '#Color_Space' > This< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > gamma< / a > < a href = '#Color_Space' > is< / a > < a href = '#Color_Space' > not< / a > < a href = '#Color_Space' > close< / a > < a href = '#Color_Space' > to< / a > < a href = '#Color_Space' > sRGB< / a > < a href = '#Color_Space' > gamma< / a > .
2018-03-05 18:26:16 +00:00
< / div >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#Color_Space' > Color_Space< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_colorSpace' > colorSpace< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_refColorSpace' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#sk_sp' > sk_sp< / a > & < a href = 'undocumented#sk_sp' > lt< / a > ;< a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > & < a href = 'undocumented#SkColorSpace' > gt< / a > ; < a href = '#SkBitmap_refColorSpace' > refColorSpace< / a > () < a href = '#SkBitmap_refColorSpace' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns smart pointer to < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > , < a href = 'undocumented#SkColorSpace' > the< / a > < a href = 'undocumented#SkColorSpace' > range< / a > < a href = 'undocumented#SkColorSpace' > of< / a > < a href = 'undocumented#SkColorSpace' > colors< / a > , < a href = 'undocumented#SkColorSpace' > associated< / a > < a href = 'undocumented#SkColorSpace' > with< / a >
< a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > . < a href = 'SkImageInfo_Reference#SkImageInfo' > The< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > smart< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > pointer< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > tracks< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > the< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > number< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > of< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > objects< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > sharing< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > this< / a >
< a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < a href = 'undocumented#SkColorSpace' > reference< / a > < a href = 'undocumented#SkColorSpace' > so< / a > < a href = 'undocumented#SkColorSpace' > the< / a > < a href = 'undocumented#SkColorSpace' > memory< / a > < a href = 'undocumented#SkColorSpace' > is< / a > < a href = 'undocumented#SkColorSpace' > released< / a > < a href = 'undocumented#SkColorSpace' > when< / a > < a href = 'undocumented#SkColorSpace' > the< / a > < a href = 'undocumented#SkColorSpace' > owners< / a > < a href = 'undocumented#SkColorSpace' > destruct< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
The returned < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < a href = 'undocumented#SkColorSpace' > is< / a > < a href = 'undocumented#SkColorSpace' > immutable< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < a href = 'undocumented#SkColorSpace' > in< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > wrapped< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > in< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > a< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > smart< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > pointer< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "cb028b7931da85b949ad0953b9711f9f" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#Color_Space' > Color_Space< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_colorSpace' > colorSpace< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_bytesPerPixel' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
int < a href = '#SkBitmap_bytesPerPixel' > bytesPerPixel< / a > () < a href = '#SkBitmap_bytesPerPixel' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns number of bytes per < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > required< / a > < a href = 'undocumented#Pixel' > by< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > .
Returns zero if < a href = '#SkBitmap_colorType' > colorType< / a > ( < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-10-31 16:14:03 +00:00
bytes in < a href = 'undocumented#Pixel' > pixel< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "2a688e6f0a516c0d44a826381e9d637f" > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > kARGB_4444_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > kRGBA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_888x_SkColorType' > kRGB_888x_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > kBGRA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_1010102_SkColorType' > kRGBA_1010102_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_101010x_SkColorType' > kRGB_101010x_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > kRGBA_F16_SkColorType< / a >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
2018-01-30 15:08:57 +00:00
color: kUnknown_SkColorType bytesPerPixel: 0
color: kAlpha_8_SkColorType bytesPerPixel: 1
color: kRGB_565_SkColorType bytesPerPixel: 2
color: kARGB_4444_SkColorType bytesPerPixel: 2
color: kRGBA_8888_SkColorType bytesPerPixel: 4
2018-03-05 18:26:16 +00:00
color: kRGB_888x_SkColorType bytesPerPixel: 4
2018-01-30 15:08:57 +00:00
color: kBGRA_8888_SkColorType bytesPerPixel: 4
2018-03-05 18:26:16 +00:00
color: kRGBA_1010102_SkColorType bytesPerPixel: 4
color: kRGB_101010x_SkColorType bytesPerPixel: 4
2018-01-30 15:08:57 +00:00
color: kGray_8_SkColorType bytesPerPixel: 1
color: kRGBA_F16_SkColorType bytesPerPixel: 8
2017-10-04 18:31:33 +00:00
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_rowBytesAsPixels' > rowBytesAsPixels< / a > < a href = '#SkBitmap_width' > width< / a > < a href = '#SkBitmap_shiftPerPixel' > shiftPerPixel< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_bytesPerPixel' > bytesPerPixel< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_rowBytesAsPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
int < a href = '#SkBitmap_rowBytesAsPixels' > rowBytesAsPixels< / a > () < a href = '#SkBitmap_rowBytesAsPixels' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
Returns number of pixels that fit on row. Should be greater than or equal to
2018-10-31 16:14:03 +00:00
< a href = '#SkBitmap_width' > width()< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
maximum pixels per row
### Example
2018-07-06 05:23:23 +00:00
< div > < fiddle-embed name = "03a9e08082a23a98de17c3e24871d61a" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
rowBytes: 4 rowBytesAsPixels: 1
rowBytes: 5 rowBytesAsPixels: 1
rowBytes: 6 rowBytesAsPixels: 1
rowBytes: 7 rowBytesAsPixels: 1
rowBytes: 8 rowBytesAsPixels: 2
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_shiftPerPixel' > shiftPerPixel< / a > < a href = '#SkBitmap_width' > width< / a > < a href = '#SkBitmap_bytesPerPixel' > bytesPerPixel< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_shiftPerPixel' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
int < a href = '#SkBitmap_shiftPerPixel' > shiftPerPixel< / a > () < a href = '#SkBitmap_shiftPerPixel' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns bit shift converting row bytes to row pixels.
2018-05-16 11:07:07 +00:00
Returns zero for < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
one of: 0, 1, 2, 3; left shift to convert pixels to bytes
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "56ede4b7d45c15d5936f81ac3d74f070" > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > kARGB_4444_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > kRGBA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_888x_SkColorType' > kRGB_888x_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > kBGRA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_1010102_SkColorType' > kRGBA_1010102_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_101010x_SkColorType' > kRGB_101010x_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > kRGBA_F16_SkColorType< / a >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
2018-03-05 18:26:16 +00:00
color: kUnknown_SkColorType shiftPerPixel: 0
color: kAlpha_8_SkColorType shiftPerPixel: 0
color: kRGB_565_SkColorType shiftPerPixel: 1
color: kARGB_4444_SkColorType shiftPerPixel: 1
color: kRGBA_8888_SkColorType shiftPerPixel: 2
color: kRGB_888x_SkColorType shiftPerPixel: 2
color: kBGRA_8888_SkColorType shiftPerPixel: 2
color: kRGBA_1010102_SkColorType shiftPerPixel: 2
color: kRGB_101010x_SkColorType shiftPerPixel: 2
color: kGray_8_SkColorType shiftPerPixel: 0
color: kRGBA_F16_SkColorType shiftPerPixel: 3
2017-10-04 18:31:33 +00:00
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_rowBytesAsPixels' > rowBytesAsPixels< / a > < a href = '#SkBitmap_width' > width< / a > < a href = '#SkBitmap_bytesPerPixel' > bytesPerPixel< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_empty' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_empty' > empty()< / a > < a href = '#SkBitmap_empty' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns true if either < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > or< / a > < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > are< / a > < a href = '#SkBitmap_height' > zero< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Does not check if < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > ; < a href = 'undocumented#SkPixelRef' > call< / a > < a href = '#SkBitmap_drawsNothing' > drawsNothing< / a > () < a href = '#SkBitmap_drawsNothing' > to< / a > < a href = '#SkBitmap_drawsNothing' > check< / a > < a href = '#SkBitmap_width' > width()< / a > ,
< a href = '#SkBitmap_height' > height()< / a > , < a href = '#SkBitmap_height' > and< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-01-26 17:56:22 +00:00
true if dimensions do not enclose area
2017-10-04 18:31:33 +00:00
### Example
2018-07-11 05:28:17 +00:00
< div > < fiddle-embed name = "a3762c2722b56ba55e42689c527f146c" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
width: 0 height: 0 empty: true
width: 0 height: 2 empty: true
width: 2 height: 0 empty: true
width: 2 height: 2 empty: false
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_drawsNothing' > drawsNothing< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_isNull' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_isNull' > isNull< / a > () < a href = '#SkBitmap_isNull' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns true if < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Does not check if < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > or< / a > < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > are< / a > < a href = '#SkBitmap_height' > zero< / a > ; < a href = '#SkBitmap_height' > call< / a > < a href = '#SkBitmap_drawsNothing' > drawsNothing< / a > () < a href = '#SkBitmap_drawsNothing' > to< / a > < a href = '#SkBitmap_drawsNothing' > check< / a >
< a href = '#SkBitmap_width' > width()< / a > , < a href = '#SkBitmap_height' > height()< / a > , < a href = '#SkBitmap_height' > and< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
true if no < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > associated< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-08 05:32:09 +00:00
< div > < fiddle-embed name = "211ec89418011aa6e54aa2cc9567e003" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
empty bitmap does not have pixels
bitmap with dimensions does not have pixels
allocated bitmap does have pixels
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_empty' > empty()< / a > < a href = '#SkBitmap_drawsNothing' > drawsNothing< / a > < a href = '#SkBitmap_pixelRef' > pixelRef< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_drawsNothing' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_drawsNothing' > drawsNothing< / a > () < a href = '#SkBitmap_drawsNothing' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns true if < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > or< / a > < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > are< / a > < a href = '#SkBitmap_height' > zero< / a > , < a href = '#SkBitmap_height' > or< / a > < a href = '#SkBitmap_height' > if< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > .
If true, < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > has< / a > < a href = 'SkBitmap_Reference#SkBitmap' > no< / a > < a href = 'SkBitmap_Reference#SkBitmap' > effect< / a > < a href = 'SkBitmap_Reference#SkBitmap' > when< / a > < a href = 'SkBitmap_Reference#SkBitmap' > drawn< / a > < a href = 'SkBitmap_Reference#SkBitmap' > or< / a > < a href = 'SkBitmap_Reference#SkBitmap' > drawn< / a > < a href = 'SkBitmap_Reference#SkBitmap' > into< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
true if drawing has no effect
### Example
2018-07-05 05:35:27 +00:00
< div > < fiddle-embed name = "daacf43394ce4045a362a48b5774deed" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
empty:true isNull:true drawsNothing:true
empty:true isNull:false drawsNothing:true
empty:false isNull:true drawsNothing:true
empty:false isNull:false drawsNothing:false
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_empty' > empty()< / a > < a href = '#SkBitmap_isNull' > isNull< / a > < a href = '#SkBitmap_pixelRef' > pixelRef< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_rowBytes' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
size_t < a href = '#SkBitmap_rowBytes' > rowBytes< / a > () < a href = '#SkBitmap_rowBytes' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns row bytes, the interval from one < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a > < a href = 'undocumented#Pixel' > to< / a > < a href = 'undocumented#Pixel' > the< / a > < a href = 'undocumented#Pixel' > next< / a > . < a href = 'undocumented#Pixel' > Row< / a > < a href = 'undocumented#Pixel' > bytes< / a >
< a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > at< / a > < a href = 'undocumented#Pixel' > least< / a > < a href = 'undocumented#Pixel' > as< / a > < a href = 'undocumented#Pixel' > large< / a > < a href = 'undocumented#Pixel' > as< / a > : < code > < a href = '#SkBitmap_width' > width()< / a > * < a href = '#SkBitmap_info' > info()< / a > .< a href = '#SkImageInfo_bytesPerPixel' > bytesPerPixel< / a > ()< / code > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns zero if < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > if< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > row< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > bytes< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > supplied< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > to< / a >
< a href = '#SkBitmap_setInfo' > setInfo< / a > < a href = '#SkBitmap_setInfo' > is< / a > < a href = '#SkBitmap_setInfo' > not< / a > < a href = '#SkBitmap_setInfo' > large< / a > < a href = '#SkBitmap_setInfo' > enough< / a > < a href = '#SkBitmap_setInfo' > to< / a > < a href = '#SkBitmap_setInfo' > hold< / a > < a href = '#SkBitmap_setInfo' > a< / a > < a href = '#SkBitmap_setInfo' > row< / a > < a href = '#SkBitmap_setInfo' > of< / a > < a href = '#SkBitmap_setInfo' > pixels< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
byte length of < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "a654fd0b73f424859ae6c95e03f55099" >
#### Example Output
~~~~
setInfo returned:false rowBytes:0
setInfo returned:true rowBytes:8
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_info' > info()< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_setAlphaType' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
bool < a href = '#SkBitmap_setAlphaType' > setAlphaType< / a > (< a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkAlphaType' > if< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > compatible< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > with< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > .
Returns true unless < a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > and< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > current< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a >
2018-05-16 11:07:07 +00:00
is not < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns true if < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > . < a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > ignored< / a > , < a href = '#SkBitmap_setAlphaType_alphaType' > and< / a >
< a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > remains< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns true if < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > is< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > .
< a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > ignored< / a > , < a href = '#SkBitmap_setAlphaType_alphaType' > and< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > remains< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
If < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > is< / a > < a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > kARGB_4444_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > kRGBA_8888_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > kBGRA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > kRGBA_F16_SkColorType< / a > : < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > returns< / a > < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > true< / a > < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > unless< / a >
< a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > and< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > is< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > not< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > .
If < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > , < a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > ignored< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
If < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > is< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > returns< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > true< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > unless< / a >
< a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > and< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > is< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > not< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > .
If < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > , < a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > ignored< / a > . < a href = '#SkBitmap_setAlphaType_alphaType' > If< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > alphaType< / a > < a href = '#SkBitmap_setAlphaType_alphaType' > is< / a >
< a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > kUnpremul_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > it< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > is< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > treated< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > as< / a > < a href = 'SkImageInfo_Reference#kPremul_SkAlphaType' > kPremul_SkAlphaType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
This changes < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > in< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > ; < a href = 'undocumented#SkPixelRef' > all< / a > < a href = 'SkBitmap_Reference#Bitmap' > bitmaps< / a > < a href = 'SkBitmap_Reference#Bitmap' > sharing< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
2017-10-04 18:31:33 +00:00
are affected.
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_setAlphaType_alphaType' > < code > < strong > alphaType< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > one of:< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
2018-10-31 16:14:03 +00:00
< a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kPremul_SkAlphaType' > kPremul_SkAlphaType< / a > ,
< a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > kUnpremul_SkAlphaType< / a >
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > is< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > set< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-10-16 14:30:28 +00:00
< div > < fiddle-embed name = "af3adcbea7b58bf90298ca5e0ea93030" > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kPremul_SkAlphaType' > kPremul_SkAlphaType< / a > ,
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > kUnpremul_SkAlphaType< / a >
< a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > ,
2018-05-16 11:07:07 +00:00
< a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > kARGB_4444_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > kRGBA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_888x_SkColorType' > kRGB_888x_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > kBGRA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_1010102_SkColorType' > kRGBA_1010102_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_101010x_SkColorType' > kRGB_101010x_SkColorType< / a > ,
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > kRGBA_F16_SkColorType< / a >
< / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > < a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = '#Image_Info' > Image_Info< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void* < a href = '#SkBitmap_getPixels' > getPixels< / a > () < a href = '#SkBitmap_getPixels' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a > , < a href = 'undocumented#Pixel' > the< / a > < a href = 'undocumented#Pixel' > base< / a > < a href = 'undocumented#Pixel' > address< / a > < a href = 'undocumented#Pixel' > corresponding< / a > < a href = 'undocumented#Pixel' > to< / a > < a href = 'undocumented#Pixel' > the< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > origin< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "e006bb05cf74ec8d2b3d6adeb5dba11b" >
#### Example Output
~~~~
bitmap.getColor(0, 1) == 0x00000000
bitmap.getColor(0, 0) == 0xFFFFFFFF
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_isNull' > isNull< / a > < a href = '#SkBitmap_drawsNothing' > drawsNothing< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_computeByteSize' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
size_t < a href = '#SkBitmap_computeByteSize' > computeByteSize< / a > () < a href = '#SkBitmap_computeByteSize' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns minimum memory required for < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > storage< / a > .
Does not include unused memory on last row when < a href = '#SkBitmap_rowBytesAsPixels' > rowBytesAsPixels< / a > () < a href = '#SkBitmap_rowBytesAsPixels' > exceeds< / a > < a href = '#SkBitmap_width' > width()< / a > .
2017-10-04 18:31:33 +00:00
Returns zero if result does not fit in size_t.
2018-11-07 19:59:03 +00:00
Returns zero if < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > or< / a > < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > is< / a > 0.
Returns < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > times< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > () < a href = '#SkBitmap_rowBytes' > if< / a > < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > in< / a > < a href = 'undocumented#Size' > bytes< / a > < a href = 'undocumented#Size' > of< / a > < a href = 'SkImage_Reference#Image' > image< / a > < a href = 'SkImage_Reference#Image' > buffer< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-18 20:21:51 +00:00
< div > < fiddle-embed name = "165c8f208829fc0908e8a50da60c0076" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
width: 1 height: 1 computeByteSize: 4
width: 1 height: 1000 computeByteSize: 4999
width: 1 height: 1000000 computeByteSize: 4999999
width: 1000 height: 1 computeByteSize: 4000
width: 1000 height: 1000 computeByteSize: 4999000
width: 1000 height: 1000000 computeByteSize: 4999999000
width: 1000000 height: 1 computeByteSize: 4000000
width: 1000000 height: 1000 computeByteSize: 4999000000
width: 1000000 height: 1000000 computeByteSize: 4999999000000
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_computeByteSize' > computeByteSize< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_isImmutable' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_isImmutable' > isImmutable< / a > () < a href = '#SkBitmap_isImmutable' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
Returns true if pixels can not change.
2018-11-07 19:59:03 +00:00
Most immutable < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > checks< / a > < a href = 'SkBitmap_Reference#SkBitmap' > trigger< / a > < a href = 'SkBitmap_Reference#SkBitmap' > an< / a > < a href = 'SkBitmap_Reference#SkBitmap' > assert< / a > < a href = 'SkBitmap_Reference#SkBitmap' > only< / a > < a href = 'SkBitmap_Reference#SkBitmap' > on< / a > < a href = 'SkBitmap_Reference#SkBitmap' > debug< / a > < a href = 'SkBitmap_Reference#SkBitmap' > builds< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
true if pixels are immutable
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "db61fdcd382342ee88ea1b4f27c27b95" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
original is immutable
copy is immutable
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_setImmutable' > setImmutable< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > ::< a href = '#SkPixelRef_isImmutable' > isImmutable< / a > < a href = 'SkImage_Reference#SkImage' > SkImage< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_setImmutable' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
void < a href = '#SkBitmap_setImmutable' > setImmutable< / a > ()
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets internal flag to mark < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > as< / a > < a href = 'SkBitmap_Reference#SkBitmap' > immutable< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > Once< / a > < a href = 'SkBitmap_Reference#SkBitmap' > set< / a > , < a href = 'SkBitmap_Reference#SkBitmap' > pixels< / a > < a href = 'SkBitmap_Reference#SkBitmap' > can< / a > < a href = 'SkBitmap_Reference#SkBitmap' > not< / a > < a href = 'SkBitmap_Reference#SkBitmap' > change< / a > .
Any other < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > sharing< / a > < a href = 'SkBitmap_Reference#Bitmap' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > same< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > are< / a > < a href = 'undocumented#SkPixelRef' > also< / a > < a href = 'undocumented#SkPixelRef' > marked< / a > < a href = 'undocumented#SkPixelRef' > as< / a > < a href = 'undocumented#SkPixelRef' > immutable< / a > .
Once < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > marked< / a > < a href = 'undocumented#SkPixelRef' > immutable< / a > , < a href = 'undocumented#SkPixelRef' > the< / a > < a href = 'undocumented#SkPixelRef' > setting< / a > < a href = 'undocumented#SkPixelRef' > cannot< / a > < a href = 'undocumented#SkPixelRef' > be< / a > < a href = 'undocumented#SkPixelRef' > cleared< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Writing to immutable < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > pixels< / a > < a href = 'SkBitmap_Reference#SkBitmap' > triggers< / a > < a href = 'SkBitmap_Reference#SkBitmap' > an< / a > < a href = 'SkBitmap_Reference#SkBitmap' > assert< / a > < a href = 'SkBitmap_Reference#SkBitmap' > on< / a > < a href = 'SkBitmap_Reference#SkBitmap' > debug< / a > < a href = 'SkBitmap_Reference#SkBitmap' > builds< / a > .
2017-10-04 18:31:33 +00:00
### Example
2018-03-05 18:26:16 +00:00
< div > < fiddle-embed name = "9210060d1f4ca46e1375496237902ef3" > < div > Triggers assert if SK_DEBUG is true, runs fine otherwise.
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_isImmutable' > isImmutable< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > ::< a href = '#SkPixelRef_setImmutable' > setImmutable< / a > < a href = 'SkImage_Reference#SkImage' > SkImage< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_isOpaque' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_isOpaque' > isOpaque< / a > () < a href = '#SkBitmap_isOpaque' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns true if < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > is< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > set< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > to< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > hint< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > that< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > all< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > pixels< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > are< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > opaque< / a > ; < a href = 'SkImageInfo_Reference#SkAlphaType' > their< / a >
< a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > value< / a > < a href = 'SkColor_Reference#Alpha' > is< / a > < a href = 'SkColor_Reference#Alpha' > implicitly< / a > < a href = 'SkColor_Reference#Alpha' > or< / a > < a href = 'SkColor_Reference#Alpha' > explicitly< / a > 1.0. < a href = 'SkColor_Reference#Alpha' > If< / a > < a href = 'SkColor_Reference#Alpha' > true< / a > , < a href = 'SkColor_Reference#Alpha' > and< / a > < a href = 'SkColor_Reference#Alpha' > all< / a > < a href = 'SkColor_Reference#Alpha' > pixels< / a > < a href = 'SkColor_Reference#Alpha' > are< / a >
2018-03-16 15:34:15 +00:00
not opaque, Skia may draw incorrectly.
2018-11-07 19:59:03 +00:00
Does not check if < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > allows< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > , < a href = 'SkColor_Reference#Alpha' > or< / a > < a href = 'SkColor_Reference#Alpha' > if< / a > < a href = 'SkColor_Reference#Alpha' > any< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > value< / a > < a href = 'undocumented#Pixel' > has< / a >
2017-10-04 18:31:33 +00:00
transparency.
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > is< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "5e76b68bb46d54315eb0c12d83bd6949" > < div > < a href = '#SkBitmap_isOpaque' > isOpaque< / a > < a href = '#SkBitmap_isOpaque' > ignores< / a > < a href = '#SkBitmap_isOpaque' > whether< / a > < a href = '#SkBitmap_isOpaque' > all< / a > < a href = '#SkBitmap_isOpaque' > pixels< / a > < a href = '#SkBitmap_isOpaque' > are< / a > < a href = '#SkBitmap_isOpaque' > opaque< / a > < a href = '#SkBitmap_isOpaque' > or< / a > < a href = '#SkBitmap_isOpaque' > not< / a > .
2018-03-05 18:26:16 +00:00
< / div >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
isOpaque: false
isOpaque: false
isOpaque: true
isOpaque: true
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_ComputeIsOpaque' > ComputeIsOpaque< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_isOpaque' > isOpaque< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_isVolatile' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_isVolatile' > isVolatile< / a > () < a href = '#SkBitmap_isVolatile' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-07-11 20:18:41 +00:00
Provides a hint to caller that pixels should not be cached. Only true if
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_setIsVolatile' > setIsVolatile< / a > () < a href = '#SkBitmap_setIsVolatile' > has< / a > < a href = '#SkBitmap_setIsVolatile' > been< / a > < a href = '#SkBitmap_setIsVolatile' > called< / a > < a href = '#SkBitmap_setIsVolatile' > to< / a > < a href = '#SkBitmap_setIsVolatile' > mark< / a > < a href = '#SkBitmap_setIsVolatile' > as< / a > < a href = '#SkBitmap_setIsVolatile' > volatile< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Volatile state is not shared by other < a href = 'SkBitmap_Reference#Bitmap' > bitmaps< / a > < a href = 'SkBitmap_Reference#Bitmap' > sharing< / a > < a href = 'SkBitmap_Reference#Bitmap' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > same< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
true if marked volatile
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "23c4543ac6cdd0e8fe762816a0dc2e03" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
original is volatile
copy is not volatile
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_setIsVolatile' > setIsVolatile< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_setIsVolatile' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_setIsVolatile' > setIsVolatile< / a > (< a href = '#SkBitmap_setIsVolatile' > bool< / a > < a href = '#SkBitmap_isVolatile' > isVolatile< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets if pixels should be read from < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > on< / a > < a href = 'undocumented#SkPixelRef' > every< / a > < a href = 'undocumented#SkPixelRef' > access< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > are< / a > < a href = 'SkBitmap_Reference#SkBitmap' > not< / a >
volatile by default; a GPU back end may upload < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > values< / a > < a href = 'undocumented#Pixel' > expecting< / a > < a href = 'undocumented#Pixel' > them< / a > < a href = 'undocumented#Pixel' > to< / a > < a href = 'undocumented#Pixel' > be< / a >
accessed repeatedly. Marking temporary < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > as< / a > < a href = 'SkBitmap_Reference#SkBitmap' > volatile< / a > < a href = 'SkBitmap_Reference#SkBitmap' > provides< / a > < a href = 'SkBitmap_Reference#SkBitmap' > a< / a > < a href = 'SkBitmap_Reference#SkBitmap' > hint< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a >
< a href = 'undocumented#SkBaseDevice' > SkBaseDevice< / a > < a href = 'undocumented#SkBaseDevice' > that< / a > < a href = 'undocumented#SkBaseDevice' > the< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > pixels< / a > < a href = 'SkBitmap_Reference#SkBitmap' > should< / a > < a href = 'SkBitmap_Reference#SkBitmap' > not< / a > < a href = 'SkBitmap_Reference#SkBitmap' > be< / a > < a href = 'SkBitmap_Reference#SkBitmap' > cached< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > This< / a > < a href = 'SkBitmap_Reference#SkBitmap' > can< / a >
2017-10-04 18:31:33 +00:00
improve performance by avoiding overhead and reducing resource
2018-10-31 16:14:03 +00:00
consumption on < a href = 'undocumented#SkBaseDevice' > SkBaseDevice< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_setIsVolatile_isVolatile' > < code > < strong > isVolatile< / strong > < / code > < / a > < / td >
< td > true if backing pixels are temporary< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "e8627a4df659b896402f89a91326618f" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_setIsVolatile_isVolatile' > isVolatile< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_reset' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_reset' > reset()< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Resets to its initial state; all fields are set to zero, as if < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > had< / a >
2018-05-16 11:07:07 +00:00
been initialized by < a href = '#SkBitmap_empty_constructor' > SkBitmap()< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Sets width, height, row bytes to zero; < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a > < a href = 'undocumented#Pixel' > to< / a > < a href = 'undocumented#Pixel' > nullptr< / a > ; < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > to< / a >
< a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > ; < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > and< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > to< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
If < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > allocated< / a > , < a href = 'undocumented#SkPixelRef' > its< / a > < a href = 'undocumented#SkPixelRef' > reference< / a > < a href = 'undocumented#SkPixelRef' > count< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > decreased< / a > < a href = 'undocumented#SkPixelRef' > by< / a > < a href = 'undocumented#SkPixelRef' > one< / a > , < a href = 'undocumented#SkPixelRef' > releasing< / a >
its memory if < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > is< / a > < a href = 'SkBitmap_Reference#SkBitmap' > the< / a > < a href = 'SkBitmap_Reference#SkBitmap' > sole< / a > < a href = 'SkBitmap_Reference#SkBitmap' > owner< / a > .
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "52ccaeda67924373c5b55a2b89fe314d" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
width:1 height:1 isNull:false
width:0 height:0 isNull:true
~~~~
< / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_empty_constructor' > SkBitmap()< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_ComputeIsOpaque' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
static bool < a href = '#SkBitmap_ComputeIsOpaque' > ComputeIsOpaque< / a > (< a href = '#SkBitmap_ComputeIsOpaque' > const< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > & < a href = 'SkBitmap_Reference#SkBitmap' > bm< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns true if all pixels are opaque. < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > determines< / a > < a href = 'SkImageInfo_Reference#SkColorType' > how< / a > < a href = 'SkImageInfo_Reference#SkColorType' > pixels< / a >
are encoded, and whether < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > describes< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > . < a href = 'SkColor_Reference#Alpha' > Returns< / a > < a href = 'SkColor_Reference#Alpha' > true< / a > < a href = 'SkColor_Reference#Alpha' > for< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a >
without < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > in< / a > < a href = 'SkColor_Reference#Alpha' > each< / a > < a href = 'undocumented#Pixel' > pixel< / a > ; < a href = 'undocumented#Pixel' > for< / a > < a href = 'undocumented#Pixel' > other< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > returns< / a > < a href = 'SkImageInfo_Reference#SkColorType' > true< / a > < a href = 'SkImageInfo_Reference#SkColorType' > if< / a > < a href = 'SkImageInfo_Reference#SkColorType' > all< / a >
pixels have < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > values< / a > < a href = 'SkColor_Reference#Alpha' > equivalent< / a > < a href = 'SkColor_Reference#Alpha' > to< / a > 1.0 < a href = 'SkColor_Reference#Alpha' > or< / a > < a href = 'SkColor_Reference#Alpha' > greater< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
For < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > : < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > always< / a >
2018-10-31 16:14:03 +00:00
returns true. For < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > kBGRA_8888_SkColorType< / a > ,
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > kRGBA_8888_SkColorType< / a > : < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > returns< / a > < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > true< / a > < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > if< / a > < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > all< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > values< / a > < a href = 'SkColor_Reference#Alpha' > are< / a > 255.
For < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > kARGB_4444_SkColorType< / a > : < a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > returns< / a > < a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > true< / a > < a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > if< / a > < a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > all< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > values< / a > < a href = 'SkColor_Reference#Alpha' > are< / a > 15.
For < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > kRGBA_F16_SkColorType< / a > : < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > returns< / a > < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > true< / a > < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > if< / a > < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > all< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > values< / a > < a href = 'SkColor_Reference#Alpha' > are< / a > 1.0 < a href = 'SkColor_Reference#Alpha' > or< / a >
2017-10-04 18:31:33 +00:00
greater.
2018-05-16 11:07:07 +00:00
Returns false for < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_ComputeIsOpaque_bm' > < code > < strong > bm< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > check< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if all pixels have opaque values or < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > is< / a > < a href = 'SkImageInfo_Reference#SkColorType' > opaque< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-05 05:35:27 +00:00
< div > < fiddle-embed name = "9df1baa17658fbd0c419780f26fd854f" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
computeIsOpaque: false
computeIsOpaque: true
computeIsOpaque: false
computeIsOpaque: true
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_isOpaque' > isOpaque< / a > < a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = 'SkColor_Reference#Alpha' > Alpha< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getBounds' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_getBounds' > getBounds< / a > (< a href = 'SkRect_Reference#SkRect' > SkRect< / a > * < a href = 'SkRect_Reference#SkRect' > bounds< / a > ) < a href = 'SkRect_Reference#SkRect' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-10-31 16:14:03 +00:00
Returns < a href = 'SkRect_Reference#SkRect' > SkRect< / a > { 0, 0, < a href = '#SkBitmap_width' > width()< / a > , < a href = '#SkBitmap_height' > height()< / a > }.
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_getBounds_bounds' > < code > < strong > bounds< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > container for floating < a href = 'SkPoint_Reference#Point' > point< / a > < a href = 'SkPoint_Reference#Point' > rectangle< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
< div > < fiddle-embed name = "2431ebc7e7d1e91e6d9daafd0f7a478f" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_bounds' > bounds()< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getBounds_2' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_getBounds' > getBounds< / a > (< a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > * < a href = 'SkIRect_Reference#SkIRect' > bounds< / a > ) < a href = 'SkIRect_Reference#SkIRect' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-10-31 16:14:03 +00:00
Returns < a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > { 0, 0, < a href = '#SkBitmap_width' > width()< / a > , < a href = '#SkBitmap_height' > height()< / a > }.
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_getBounds_2_bounds' > < code > < strong > bounds< / strong > < / code > < / a > < / td >
< td > container for integral rectangle< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
< div > < fiddle-embed name = "0c45da35172bc0a529b2faecddae62a2" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_bounds' > bounds()< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_bounds' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > < a href = '#SkBitmap_bounds' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-10-31 16:14:03 +00:00
Returns < a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > { 0, 0, < a href = '#SkBitmap_width' > width()< / a > , < a href = '#SkBitmap_height' > height()< / a > }.
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
integral rectangle from origin to < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > and< / a > < a href = '#SkBitmap_height' > height()< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-01 05:25:37 +00:00
< div > < fiddle-embed name = "3e9126152ff1cc592aef6facbcb5fc96" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getBounds' > getBounds< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_dimensions' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#SkISize' > SkISize< / a > < a href = '#SkBitmap_dimensions' > dimensions()< / a > < a href = '#SkBitmap_dimensions' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-10-31 16:14:03 +00:00
Returns < a href = 'undocumented#SkISize' > SkISize< / a > { < a href = '#SkBitmap_width' > width()< / a > , < a href = '#SkBitmap_height' > height()< / a > }.
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
integral < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > of< / a > < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > and< / a > < a href = '#SkBitmap_height' > height()< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-05 05:35:27 +00:00
< div > < fiddle-embed name = "647056bcc12c27fb4413f212f33a2898" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-10-16 14:30:28 +00:00
< a href = '#SkBitmap_height' > height< / a > < a href = '#SkBitmap_width' > width< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getSubset' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > < a href = '#SkBitmap_getSubset' > getSubset< / a > () < a href = '#SkBitmap_getSubset' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns the bounds of this < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > , < a href = 'SkBitmap_Reference#Bitmap' > offset< / a > < a href = 'SkBitmap_Reference#Bitmap' > by< / a > < a href = 'SkBitmap_Reference#Bitmap' > its< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > origin< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
bounds within < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > bounds< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "d6dd0b425aa550f21b938a18c2e1a981" >
#### Example Output
~~~~
source: 0, 0, 512, 512
subset: 100, 100, 412, 412
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_extractSubset' > extractSubset< / a > < a href = '#SkBitmap_getBounds' > getBounds< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_setInfo' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_setInfo' > setInfo< / a > (< a href = '#SkBitmap_setInfo' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > imageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > = 0)
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets width, height, < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Color_Space' > Color_Space< / a > , < a href = '#Color_Space' > and< / a > < a href = '#Color_Space' > optional< / a >
< a href = '#SkBitmap_setInfo_rowBytes' > rowBytes< / a > . < a href = '#SkBitmap_setInfo_rowBytes' > Frees< / a > < a href = '#SkBitmap_setInfo_rowBytes' > pixels< / a > , < a href = '#SkBitmap_setInfo_rowBytes' > and< / a > < a href = '#SkBitmap_setInfo_rowBytes' > returns< / a > < a href = '#SkBitmap_setInfo_rowBytes' > true< / a > < a href = '#SkBitmap_setInfo_rowBytes' > if< / a > < a href = '#SkBitmap_setInfo_rowBytes' > successful< / a > .
2018-05-16 11:07:07 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_alphaType' > alphaType< / a > () < a href = '#SkImageInfo_alphaType' > may< / a > < a href = '#SkImageInfo_alphaType' > be< / a > < a href = '#SkImageInfo_alphaType' > altered< / a > < a href = '#SkImageInfo_alphaType' > to< / a > < a href = '#SkImageInfo_alphaType' > a< / a > < a href = '#SkImageInfo_alphaType' > value< / a > < a href = '#SkImageInfo_alphaType' > permitted< / a > < a href = '#SkImageInfo_alphaType' > by< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_colorSpace' > colorSpace< / a > ().
< a href = '#SkImageInfo_colorSpace' > If< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_colorType' > colorType< / a > () < a href = '#SkImageInfo_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_alphaType' > alphaType< / a > () < a href = '#SkImageInfo_alphaType' > is< / a >
< a href = '#SkImageInfo_alphaType' > set< / a > < a href = '#SkImageInfo_alphaType' > to< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > kUnknown_SkAlphaType< / a > .
< a href = 'SkImageInfo_Reference#kUnknown_SkAlphaType' > If< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_colorType' > colorType< / a > () < a href = '#SkImageInfo_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > and< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_alphaType' > alphaType< / a > () < a href = '#SkImageInfo_alphaType' > is< / a >
< a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > kUnpremul_SkAlphaType< / a > , < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_alphaType' > alphaType< / a > () < a href = '#SkImageInfo_alphaType' > is< / a > < a href = '#SkImageInfo_alphaType' > replaced< / a > < a href = '#SkImageInfo_alphaType' > by< / a > < a href = 'SkImageInfo_Reference#kPremul_SkAlphaType' > kPremul_SkAlphaType< / a > .
< a href = 'SkImageInfo_Reference#kPremul_SkAlphaType' > If< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_colorType' > colorType< / a > () < a href = '#SkImageInfo_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > ,
< a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_alphaType' > alphaType< / a > () < a href = '#SkImageInfo_alphaType' > is< / a > < a href = '#SkImageInfo_alphaType' > set< / a > < a href = '#SkImageInfo_alphaType' > to< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > .
< a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > If< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_colorType' > colorType< / a > () < a href = '#SkImageInfo_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kARGB_4444_SkColorType' > kARGB_4444_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGBA_8888_SkColorType' > kRGBA_8888_SkColorType< / a > ,
< a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > kBGRA_8888_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kBGRA_8888_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kRGBA_F16_SkColorType' > kRGBA_F16_SkColorType< / a > : < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_alphaType' > alphaType< / a > () < a href = '#SkImageInfo_alphaType' > remains< / a >
< a href = '#SkImageInfo_alphaType' > unchanged< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_setInfo_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_setInfo_rowBytes' > must< / a > < a href = '#SkBitmap_setInfo_rowBytes' > equal< / a > < a href = '#SkBitmap_setInfo_rowBytes' > or< / a > < a href = '#SkBitmap_setInfo_rowBytes' > exceed< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > (). < a href = '#SkImageInfo_minRowBytes' > If< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_colorSpace' > colorSpace< / a > () < a href = '#SkImageInfo_colorSpace' > is< / a >
< a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = '#SkBitmap_setInfo_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_setInfo_rowBytes' > is< / a > < a href = '#SkBitmap_setInfo_rowBytes' > ignored< / a > < a href = '#SkBitmap_setInfo_rowBytes' > and< / a > < a href = '#SkBitmap_setInfo_rowBytes' > treated< / a > < a href = '#SkBitmap_setInfo_rowBytes' > as< / a > < a href = '#SkBitmap_setInfo_rowBytes' > zero< / a > ; < a href = '#SkBitmap_setInfo_rowBytes' > for< / a > < a href = '#SkBitmap_setInfo_rowBytes' > all< / a > < a href = '#SkBitmap_setInfo_rowBytes' > other< / a >
< a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > values< / a > , < a href = '#SkBitmap_setInfo_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_setInfo_rowBytes' > of< / a > < a href = '#SkBitmap_setInfo_rowBytes' > zero< / a > < a href = '#SkBitmap_setInfo_rowBytes' > is< / a > < a href = '#SkBitmap_setInfo_rowBytes' > treated< / a > < a href = '#SkBitmap_setInfo_rowBytes' > as< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > ().
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkImageInfo_minRowBytes' > Calls< / a > < a href = '#SkBitmap_reset' > reset()< / a > < a href = '#SkBitmap_reset' > and< / a > < a href = '#SkBitmap_reset' > returns< / a > < a href = '#SkBitmap_reset' > false< / a > < a href = '#SkBitmap_reset' > if< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_setInfo_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_setInfo_rowBytes' > exceeds< / a > 31 < a href = '#SkBitmap_setInfo_rowBytes' > bits< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_width' > width()< / a > < a href = '#SkImageInfo_width' > is< / a > < a href = '#SkImageInfo_width' > negative< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_height' > height()< / a > < a href = '#SkImageInfo_height' > is< / a > < a href = '#SkImageInfo_height' > negative< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_setInfo_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_setInfo_rowBytes' > is< / a > < a href = '#SkBitmap_setInfo_rowBytes' > positive< / a > < a href = '#SkBitmap_setInfo_rowBytes' > and< / a > < a href = '#SkBitmap_setInfo_rowBytes' > less< / a > < a href = '#SkBitmap_setInfo_rowBytes' > than< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_width' > width()< / a > < a href = '#SkImageInfo_width' > times< / a > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_bytesPerPixel' > bytesPerPixel< / a > ()< / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_setInfo_imageInfo' > < code > < strong > imageInfo< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > contains width, height, < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Color_Space' > Color_Space< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_setInfo_rowBytes' > < code > < strong > rowBytes< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_setInfo_imageInfo' > imageInfo< / a > .< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > () < a href = '#SkImageInfo_minRowBytes' > or< / a > < a href = '#SkImageInfo_minRowBytes' > larger< / a > ; < a href = '#SkImageInfo_minRowBytes' > or< / a > < a href = '#SkImageInfo_minRowBytes' > zero< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = '#Image_Info' > Image_Info< / a > < a href = '#Image_Info' > set< / a > < a href = '#Image_Info' > successfully< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-16 05:29:00 +00:00
< div > < fiddle-embed name = "599ab64d0aea005498176249bbfb64eb" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > < a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#SkBitmap_height' > height< / a > < a href = '#SkBitmap_setInfo_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_width' > width< / a >
2017-10-04 18:31:33 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'SkBitmap_AllocFlags' > < / a >
2017-10-04 18:31:33 +00:00
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2017-11-27 15:44:06 +00:00
< pre style = "padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0 " >
2018-05-16 11:07:07 +00:00
enum < a href = '#SkBitmap_AllocFlags' > AllocFlags< / a > {
2018-10-08 18:57:48 +00:00
< a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > = 1 < < 0 ,
2018-04-03 12:43:27 +00:00
};
2018-03-05 18:26:16 +00:00
< / pre >
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_AllocFlags' > AllocFlags< / a > < a href = '#SkBitmap_AllocFlags' > provides< / a > < a href = '#SkBitmap_AllocFlags' > the< / a > < a href = '#SkBitmap_AllocFlags' > option< / a > < a href = '#SkBitmap_AllocFlags' > to< / a > < a href = '#SkBitmap_AllocFlags' > zero< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > when< / a > < a href = 'undocumented#Pixel' > allocated< / a > .
2017-10-04 18:31:33 +00:00
### Constants
2018-05-16 11:07:07 +00:00
< table style = 'border-collapse: collapse; width: 62.5em' >
< tr >< th style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' > Const</ th >
< th style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > Value</ th >
< th style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' > Description</ th ></ tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBitmap_kZeroPixels_AllocFlag' >< code > SkBitmap::kZeroPixels_AllocFlag</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 1</ td >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
2018-11-07 19:59:03 +00:00
Instructs < a href = '#SkBitmap_tryAllocPixelsFlags' > tryAllocPixelsFlags< / a > < a href = '#SkBitmap_tryAllocPixelsFlags' > and< / a > < a href = '#SkBitmap_allocPixelsFlags' > allocPixelsFlags< / a > < a href = '#SkBitmap_allocPixelsFlags' > to< / a > < a href = '#SkBitmap_allocPixelsFlags' > zero< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > .
2018-03-05 18:26:16 +00:00
< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### See Also
2018-10-16 14:30:28 +00:00
< a href = '#SkBitmap_tryAllocPixelsFlags' > tryAllocPixelsFlags< / a > < a href = '#SkBitmap_allocPixelsFlags' > allocPixelsFlags< / a > < a href = '#SkBitmap_erase' > erase< / a > < a href = '#SkBitmap_eraseColor' > eraseColor< / a >
2017-10-04 18:31:33 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Allocate' > < / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_tryAllocPixelsFlags' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_tryAllocPixelsFlags' > tryAllocPixelsFlags< / a > (< a href = '#SkBitmap_tryAllocPixelsFlags' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > uint32_t< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > flags< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_info' > info< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_info' > following< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_info' > the< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_info' > rules< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > () < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > allocates< / a > < a href = 'undocumented#Pixel' > pixel< / a >
memory. If < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > flags< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > is< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > , < a href = '#SkBitmap_kZeroPixels_AllocFlag' > memory< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > is< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > zeroed< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns false and calls < a href = '#SkBitmap_reset' > reset()< / a > < a href = '#SkBitmap_reset' > if< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > memory< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a >
2017-11-27 15:44:06 +00:00
not be allocated, or memory could not optionally be zeroed.
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
On most platforms, allocating < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > succeed< / a > < a href = 'undocumented#Pixel' > even< / a > < a href = 'undocumented#Pixel' > though< / a > < a href = 'undocumented#Pixel' > there< / a > < a href = 'undocumented#Pixel' > is< / a >
2017-10-04 18:31:33 +00:00
not sufficient memory to hold pixels; allocation does not take place
until the pixels are written to. The actual behavior depends on the platform
2018-11-07 19:59:03 +00:00
implementation of malloc(), if < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > flags< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > is< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > zero< / a > , < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > and< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > calloc()< / a > , < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > if< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > flags< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > is< / a >
2018-10-31 16:14:03 +00:00
< a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_tryAllocPixelsFlags_flags' > flags< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > set< / a > < a href = '#SkBitmap_tryAllocPixelsFlags_flags' > to< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > offers< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > equal< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > or< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > better< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > performance< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > than< / a >
subsequently calling < a href = '#SkBitmap_eraseColor' > eraseColor< / a > () < a href = '#SkBitmap_eraseColor' > with< / a > < a href = 'SkColor_Reference#SK_ColorTRANSPARENT' > SK_ColorTRANSPARENT< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_tryAllocPixelsFlags_info' > < code > < strong > info< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > contains width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_tryAllocPixelsFlags_flags' > < code > < strong > flags< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > , < a href = '#SkBitmap_kZeroPixels_AllocFlag' > or< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > zero< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
true if pixels allocation is successful
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "f1d1880d38e0aea4cefd3e11745e8a09" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
2017-11-27 15:44:06 +00:00
bitmap allocation succeeded!
2017-10-04 18:31:33 +00:00
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixelsFlags' > allocPixelsFlags< / a > < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > < a href = 'undocumented#SkMallocPixelRef' > SkMallocPixelRef< / a > ::< a href = '#SkMallocPixelRef_MakeZeroed' > MakeZeroed< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_allocPixelsFlags' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_allocPixelsFlags' > allocPixelsFlags< / a > (< a href = '#SkBitmap_allocPixelsFlags' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > uint32_t< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > flags< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_allocPixelsFlags_info' > info< / a > < a href = '#SkBitmap_allocPixelsFlags_info' > following< / a > < a href = '#SkBitmap_allocPixelsFlags_info' > the< / a > < a href = '#SkBitmap_allocPixelsFlags_info' > rules< / a > < a href = '#SkBitmap_allocPixelsFlags_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > () < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > allocates< / a > < a href = 'undocumented#Pixel' > pixel< / a >
memory. If < a href = '#SkBitmap_allocPixelsFlags_flags' > flags< / a > < a href = '#SkBitmap_allocPixelsFlags_flags' > is< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > , < a href = '#SkBitmap_kZeroPixels_AllocFlag' > memory< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > is< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > zeroed< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Aborts execution if < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > memory< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a >
2017-11-27 15:44:06 +00:00
not be allocated, or memory could not optionally
2017-10-04 18:31:33 +00:00
be zeroed. Abort steps may be provided by the user at compile time by defining
2018-01-04 21:11:51 +00:00
SK_ABORT.
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
On most platforms, allocating < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > succeed< / a > < a href = 'undocumented#Pixel' > even< / a > < a href = 'undocumented#Pixel' > though< / a > < a href = 'undocumented#Pixel' > there< / a > < a href = 'undocumented#Pixel' > is< / a >
2017-10-04 18:31:33 +00:00
not sufficient memory to hold pixels; allocation does not take place
until the pixels are written to. The actual behavior depends on the platform
2018-11-07 19:59:03 +00:00
implementation of malloc(), if < a href = '#SkBitmap_allocPixelsFlags_flags' > flags< / a > < a href = '#SkBitmap_allocPixelsFlags_flags' > is< / a > < a href = '#SkBitmap_allocPixelsFlags_flags' > zero< / a > , < a href = '#SkBitmap_allocPixelsFlags_flags' > and< / a > < a href = '#SkBitmap_allocPixelsFlags_flags' > calloc()< / a > , < a href = '#SkBitmap_allocPixelsFlags_flags' > if< / a > < a href = '#SkBitmap_allocPixelsFlags_flags' > flags< / a > < a href = '#SkBitmap_allocPixelsFlags_flags' > is< / a >
2018-10-31 16:14:03 +00:00
< a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixelsFlags_flags' > flags< / a > < a href = '#SkBitmap_allocPixelsFlags_flags' > set< / a > < a href = '#SkBitmap_allocPixelsFlags_flags' > to< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > offers< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > equal< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > or< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > better< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > performance< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > than< / a >
subsequently calling < a href = '#SkBitmap_eraseColor' > eraseColor< / a > () < a href = '#SkBitmap_eraseColor' > with< / a > < a href = 'SkColor_Reference#SK_ColorTRANSPARENT' > SK_ColorTRANSPARENT< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_allocPixelsFlags_info' > < code > < strong > info< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > contains width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_allocPixelsFlags_flags' > < code > < strong > flags< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > kZeroPixels_AllocFlag< / a > , < a href = '#SkBitmap_kZeroPixels_AllocFlag' > or< / a > < a href = '#SkBitmap_kZeroPixels_AllocFlag' > zero< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "737e721c7d9e0f367d25521a1b823b9d" > < div > < a href = 'undocumented#Text' > Text< / a > < a href = 'undocumented#Text' > is< / a > < a href = 'undocumented#Text' > drawn< / a > < a href = 'undocumented#Text' > on< / a > < a href = 'undocumented#Text' > a< / a > < a href = 'undocumented#Text' > transparent< / a > < a href = 'undocumented#Text' > background< / a > ; < a href = 'undocumented#Text' > drawing< / a > < a href = 'undocumented#Text' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > a< / a > < a href = 'SkBitmap_Reference#Bitmap' > second< / a > < a href = 'SkBitmap_Reference#Bitmap' > time< / a >
< a href = 'SkBitmap_Reference#Bitmap' > lets< / a > < a href = 'SkBitmap_Reference#Bitmap' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > first< / a > < a href = 'SkBitmap_Reference#Bitmap' > draw< / a > < a href = 'SkBitmap_Reference#Bitmap' > show< / a > < a href = 'SkBitmap_Reference#Bitmap' > through< / a > .
2018-03-05 18:26:16 +00:00
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_tryAllocPixelsFlags' > tryAllocPixelsFlags< / a > < a href = '#SkBitmap_allocPixels' > allocPixels< / a > < a href = 'undocumented#SkMallocPixelRef' > SkMallocPixelRef< / a > ::< a href = '#SkMallocPixelRef_MakeZeroed' > MakeZeroed< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_tryAllocPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > (< a href = '#SkBitmap_tryAllocPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_tryAllocPixels_info' > info< / a > < a href = '#SkBitmap_tryAllocPixels_info' > following< / a > < a href = '#SkBitmap_tryAllocPixels_info' > the< / a > < a href = '#SkBitmap_tryAllocPixels_info' > rules< / a > < a href = '#SkBitmap_tryAllocPixels_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > () < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > allocates< / a > < a href = 'undocumented#Pixel' > pixel< / a >
memory. < a href = '#SkBitmap_tryAllocPixels_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > must< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > equal< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > or< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > exceed< / a > < a href = '#SkBitmap_tryAllocPixels_info' > info< / a > .< a href = '#SkImageInfo_width' > width()< / a > < a href = '#SkImageInfo_width' > times< / a > < a href = '#SkBitmap_tryAllocPixels_info' > info< / a > .< a href = '#SkImageInfo_bytesPerPixel' > bytesPerPixel< / a > (),
or equal zero. Pass in zero for < a href = '#SkBitmap_tryAllocPixels_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > to< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > compute< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > the< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > minimum< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > valid< / a > < a href = '#SkBitmap_tryAllocPixels_rowBytes' > value< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns false and calls < a href = '#SkBitmap_reset' > reset()< / a > < a href = '#SkBitmap_reset' > if< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > memory< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a >
2017-10-04 18:31:33 +00:00
not be allocated.
2018-11-07 19:59:03 +00:00
On most platforms, allocating < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > succeed< / a > < a href = 'undocumented#Pixel' > even< / a > < a href = 'undocumented#Pixel' > though< / a > < a href = 'undocumented#Pixel' > there< / a > < a href = 'undocumented#Pixel' > is< / a >
2017-10-04 18:31:33 +00:00
not sufficient memory to hold pixels; allocation does not take place
until the pixels are written to. The actual behavior depends on the platform
implementation of malloc().
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_tryAllocPixels_info' > < code > < strong > info< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > contains width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_tryAllocPixels_rowBytes' > < code > < strong > rowBytes< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > of< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > larger< / a > ; < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > zero< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > allocated< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "34479d5aa23ce9f5e334b0786c9edb22" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_tryAllocPixelsFlags' > tryAllocPixelsFlags< / a > < a href = '#SkBitmap_allocPixels' > allocPixels< / a > < a href = 'undocumented#SkMallocPixelRef' > SkMallocPixelRef< / a > ::< a href = '#SkMallocPixelRef_MakeAllocate' > MakeAllocate< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_allocPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_allocPixels' > allocPixels< / a > (< a href = '#SkBitmap_allocPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_allocPixels_info' > info< / a > < a href = '#SkBitmap_allocPixels_info' > following< / a > < a href = '#SkBitmap_allocPixels_info' > the< / a > < a href = '#SkBitmap_allocPixels_info' > rules< / a > < a href = '#SkBitmap_allocPixels_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > () < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > allocates< / a > < a href = 'undocumented#Pixel' > pixel< / a >
memory. < a href = '#SkBitmap_allocPixels_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > must< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > equal< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > or< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > exceed< / a > < a href = '#SkBitmap_allocPixels_info' > info< / a > .< a href = '#SkImageInfo_width' > width()< / a > < a href = '#SkImageInfo_width' > times< / a > < a href = '#SkBitmap_allocPixels_info' > info< / a > .< a href = '#SkImageInfo_bytesPerPixel' > bytesPerPixel< / a > (),
or equal zero. Pass in zero for < a href = '#SkBitmap_allocPixels_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > to< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > compute< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > the< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > minimum< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > valid< / a > < a href = '#SkBitmap_allocPixels_rowBytes' > value< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Aborts execution if < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > memory< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a >
2017-11-27 15:44:06 +00:00
not be allocated. Abort steps may be provided by
2018-01-04 21:11:51 +00:00
the user at compile time by defining SK_ABORT.
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
On most platforms, allocating < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > succeed< / a > < a href = 'undocumented#Pixel' > even< / a > < a href = 'undocumented#Pixel' > though< / a > < a href = 'undocumented#Pixel' > there< / a > < a href = 'undocumented#Pixel' > is< / a >
2017-10-04 18:31:33 +00:00
not sufficient memory to hold pixels; allocation does not take place
until the pixels are written to. The actual behavior depends on the platform
implementation of malloc().
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_allocPixels_info' > < code > < strong > info< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > contains width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_allocPixels_rowBytes' > < code > < strong > rowBytes< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > of< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > larger< / a > ; < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > zero< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
< div > < fiddle-embed name = "555c0f62f96602a9dcd459badcd005e0" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > < a href = '#SkBitmap_allocPixelsFlags' > allocPixelsFlags< / a > < a href = 'undocumented#SkMallocPixelRef' > SkMallocPixelRef< / a > ::< a href = '#SkMallocPixelRef_MakeAllocate' > MakeAllocate< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_tryAllocPixels_2' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > (< a href = '#SkBitmap_tryAllocPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_tryAllocPixels_2_info' > info< / a > < a href = '#SkBitmap_tryAllocPixels_2_info' > following< / a > < a href = '#SkBitmap_tryAllocPixels_2_info' > the< / a > < a href = '#SkBitmap_tryAllocPixels_2_info' > rules< / a > < a href = '#SkBitmap_tryAllocPixels_2_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > () < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > allocates< / a > < a href = 'undocumented#Pixel' > pixel< / a >
2018-01-04 21:11:51 +00:00
memory.
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns false and calls < a href = '#SkBitmap_reset' > reset()< / a > < a href = '#SkBitmap_reset' > if< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > memory< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a >
2017-10-04 18:31:33 +00:00
not be allocated.
2018-11-07 19:59:03 +00:00
On most platforms, allocating < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > succeed< / a > < a href = 'undocumented#Pixel' > even< / a > < a href = 'undocumented#Pixel' > though< / a > < a href = 'undocumented#Pixel' > there< / a > < a href = 'undocumented#Pixel' > is< / a >
2017-10-04 18:31:33 +00:00
not sufficient memory to hold pixels; allocation does not take place
until the pixels are written to. The actual behavior depends on the platform
implementation of malloc().
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_tryAllocPixels_2_info' > < code > < strong > info< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > contains width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > allocated< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "7ef3d043c4c5885649e591dd7dca92ff" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_tryAllocPixelsFlags' > tryAllocPixelsFlags< / a > < a href = '#SkBitmap_allocPixels' > allocPixels< / a > < a href = 'undocumented#SkMallocPixelRef' > SkMallocPixelRef< / a > ::< a href = '#SkMallocPixelRef_MakeAllocate' > MakeAllocate< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_allocPixels_2' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_allocPixels' > allocPixels< / a > (< a href = '#SkBitmap_allocPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_allocPixels_2_info' > info< / a > < a href = '#SkBitmap_allocPixels_2_info' > following< / a > < a href = '#SkBitmap_allocPixels_2_info' > the< / a > < a href = '#SkBitmap_allocPixels_2_info' > rules< / a > < a href = '#SkBitmap_allocPixels_2_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > () < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > allocates< / a > < a href = 'undocumented#Pixel' > pixel< / a >
2018-01-04 21:11:51 +00:00
memory.
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Aborts execution if < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > memory< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a >
2017-11-27 15:44:06 +00:00
not be allocated. Abort steps may be provided by
2018-01-04 21:11:51 +00:00
the user at compile time by defining SK_ABORT.
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
On most platforms, allocating < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > succeed< / a > < a href = 'undocumented#Pixel' > even< / a > < a href = 'undocumented#Pixel' > though< / a > < a href = 'undocumented#Pixel' > there< / a > < a href = 'undocumented#Pixel' > is< / a >
2017-10-04 18:31:33 +00:00
not sufficient memory to hold pixels; allocation does not take place
until the pixels are written to. The actual behavior depends on the platform
implementation of malloc().
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_allocPixels_2_info' > < code > < strong > info< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > contains width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
< div > < fiddle-embed name = "91f474a11a2112cd5c88c40a9015048d" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > < a href = '#SkBitmap_allocPixelsFlags' > allocPixelsFlags< / a > < a href = 'undocumented#SkMallocPixelRef' > SkMallocPixelRef< / a > ::< a href = '#SkMallocPixelRef_MakeAllocate' > MakeAllocate< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_tryAllocN32Pixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_tryAllocN32Pixels' > tryAllocN32Pixels< / a > (< a href = '#SkBitmap_tryAllocN32Pixels' > int< / a > < a href = '#SkBitmap_tryAllocN32Pixels' > width< / a > , < a href = '#SkBitmap_tryAllocN32Pixels' > int< / a > < a href = '#SkBitmap_tryAllocN32Pixels' > height< / a > , < a href = '#SkBitmap_tryAllocN32Pixels' > bool< / a > < a href = '#SkBitmap_isOpaque' > isOpaque< / a > = < a href = '#SkBitmap_isOpaque' > false< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_tryAllocN32Pixels_width' > width< / a > , < a href = '#SkBitmap_tryAllocN32Pixels_height' > height< / a > , < a href = '#SkBitmap_tryAllocN32Pixels_height' > and< / a > < a href = '#SkBitmap_tryAllocN32Pixels_height' > native< / a > < a href = 'SkImageInfo_Reference#Color_Type' > color type< / a > ; < a href = 'SkColor_Reference#Color' > and< / a > < a href = 'SkColor_Reference#Color' > allocates< / a >
< a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > . < a href = 'undocumented#Pixel' > If< / a > < a href = '#SkBitmap_tryAllocN32Pixels_isOpaque' > isOpaque< / a > < a href = '#SkBitmap_tryAllocN32Pixels_isOpaque' > is< / a > < a href = '#SkBitmap_tryAllocN32Pixels_isOpaque' > true< / a > , < a href = '#SkBitmap_tryAllocN32Pixels_isOpaque' > sets< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > ;
2018-05-16 11:07:07 +00:00
otherwise, sets to < a href = 'SkImageInfo_Reference#kPremul_SkAlphaType' > kPremul_SkAlphaType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Calls < a href = '#SkBitmap_reset' > reset()< / a > < a href = '#SkBitmap_reset' > and< / a > < a href = '#SkBitmap_reset' > returns< / a > < a href = '#SkBitmap_reset' > false< / a > < a href = '#SkBitmap_reset' > if< / a > < a href = '#SkBitmap_tryAllocN32Pixels_width' > width< / a > < a href = '#SkBitmap_tryAllocN32Pixels_width' > exceeds< / a > 29 < a href = '#SkBitmap_tryAllocN32Pixels_width' > bits< / a > < a href = '#SkBitmap_tryAllocN32Pixels_width' > or< / a > < a href = '#SkBitmap_tryAllocN32Pixels_width' > is< / a > < a href = '#SkBitmap_tryAllocN32Pixels_width' > negative< / a > ,
or < a href = '#SkBitmap_tryAllocN32Pixels_height' > height< / a > < a href = '#SkBitmap_tryAllocN32Pixels_height' > is< / a > < a href = '#SkBitmap_tryAllocN32Pixels_height' > negative< / a > .
2017-10-04 18:31:33 +00:00
Returns false if allocation fails.
2018-11-07 19:59:03 +00:00
Use to create < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > that< / a > < a href = 'SkBitmap_Reference#SkBitmap' > matches< / a > < a href = 'SkColor_Reference#SkPMColor' > SkPMColor< / a > , < a href = 'SkColor_Reference#SkPMColor' > the< / a > < a href = 'SkColor_Reference#SkPMColor' > native< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > arrangement< / a > < a href = 'undocumented#Pixel' > on< / a >
the platform. < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > drawn< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > output< / a > < a href = 'undocumented#Device' > device< / a > < a href = 'undocumented#Device' > skips< / a > < a href = 'undocumented#Device' > converting< / a > < a href = 'undocumented#Device' > its< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > format< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_tryAllocN32Pixels_width' > < code > < strong > width< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > column< / a > < a href = 'undocumented#Pixel' > count< / a > ; < a href = 'undocumented#Pixel' > must< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > zero< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > greater< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_tryAllocN32Pixels_height' > < code > < strong > height< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a > < a href = 'undocumented#Pixel' > count< / a > ; < a href = 'undocumented#Pixel' > must< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > zero< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > greater< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_tryAllocN32Pixels_isOpaque' > < code > < strong > isOpaque< / strong > < / code > < / a > < / td >
< td > true if pixels do not have transparency< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > allocated< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-18 20:21:51 +00:00
< div > < fiddle-embed name = "a2b1e0910f37066f15ae56368775a6d8" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > < a href = '#SkBitmap_allocN32Pixels' > allocN32Pixels< / a > < a href = 'undocumented#SkMallocPixelRef' > SkMallocPixelRef< / a > ::< a href = '#SkMallocPixelRef_MakeAllocate' > MakeAllocate< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_allocN32Pixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_allocN32Pixels' > allocN32Pixels< / a > (< a href = '#SkBitmap_allocN32Pixels' > int< / a > < a href = '#SkBitmap_allocN32Pixels' > width< / a > , < a href = '#SkBitmap_allocN32Pixels' > int< / a > < a href = '#SkBitmap_allocN32Pixels' > height< / a > , < a href = '#SkBitmap_allocN32Pixels' > bool< / a > < a href = '#SkBitmap_isOpaque' > isOpaque< / a > = < a href = '#SkBitmap_isOpaque' > false< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_allocN32Pixels_width' > width< / a > , < a href = '#SkBitmap_allocN32Pixels_height' > height< / a > , < a href = '#SkBitmap_allocN32Pixels_height' > and< / a > < a href = '#SkBitmap_allocN32Pixels_height' > the< / a > < a href = '#SkBitmap_allocN32Pixels_height' > native< / a > < a href = 'SkImageInfo_Reference#Color_Type' > color type< / a > ; < a href = 'SkColor_Reference#Color' > and< / a > < a href = 'SkColor_Reference#Color' > allocates< / a >
< a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > . < a href = 'undocumented#Pixel' > If< / a > < a href = '#SkBitmap_allocN32Pixels_isOpaque' > isOpaque< / a > < a href = '#SkBitmap_allocN32Pixels_isOpaque' > is< / a > < a href = '#SkBitmap_allocN32Pixels_isOpaque' > true< / a > , < a href = '#SkBitmap_allocN32Pixels_isOpaque' > sets< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = 'SkImageInfo_Reference#kPremul_SkAlphaType' > kPremul_SkAlphaType< / a > ;
2018-05-16 11:07:07 +00:00
otherwise, sets to < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Aborts if < a href = '#SkBitmap_allocN32Pixels_width' > width< / a > < a href = '#SkBitmap_allocN32Pixels_width' > exceeds< / a > 29 < a href = '#SkBitmap_allocN32Pixels_width' > bits< / a > < a href = '#SkBitmap_allocN32Pixels_width' > or< / a > < a href = '#SkBitmap_allocN32Pixels_width' > is< / a > < a href = '#SkBitmap_allocN32Pixels_width' > negative< / a > , < a href = '#SkBitmap_allocN32Pixels_width' > or< / a > < a href = '#SkBitmap_allocN32Pixels_height' > height< / a > < a href = '#SkBitmap_allocN32Pixels_height' > is< / a > < a href = '#SkBitmap_allocN32Pixels_height' > negative< / a > , < a href = '#SkBitmap_allocN32Pixels_height' > or< / a >
2017-10-04 18:31:33 +00:00
allocation fails. Abort steps may be provided by the user at compile time by
2018-01-04 21:11:51 +00:00
defining SK_ABORT.
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Use to create < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > that< / a > < a href = 'SkBitmap_Reference#SkBitmap' > matches< / a > < a href = 'SkColor_Reference#SkPMColor' > SkPMColor< / a > , < a href = 'SkColor_Reference#SkPMColor' > the< / a > < a href = 'SkColor_Reference#SkPMColor' > native< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > arrangement< / a > < a href = 'undocumented#Pixel' > on< / a >
the platform. < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > drawn< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > output< / a > < a href = 'undocumented#Device' > device< / a > < a href = 'undocumented#Device' > skips< / a > < a href = 'undocumented#Device' > converting< / a > < a href = 'undocumented#Device' > its< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > format< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_allocN32Pixels_width' > < code > < strong > width< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > column< / a > < a href = 'undocumented#Pixel' > count< / a > ; < a href = 'undocumented#Pixel' > must< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > zero< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > greater< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_allocN32Pixels_height' > < code > < strong > height< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a > < a href = 'undocumented#Pixel' > count< / a > ; < a href = 'undocumented#Pixel' > must< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > zero< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > greater< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_allocN32Pixels_isOpaque' > < code > < strong > isOpaque< / strong > < / code > < / a > < / td >
< td > true if pixels do not have transparency< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
< div > < fiddle-embed name = "c717491f9251604724c9cbde7088ec20" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixels' > allocPixels< / a > < a href = '#SkBitmap_tryAllocN32Pixels' > tryAllocN32Pixels< / a > < a href = 'undocumented#SkMallocPixelRef' > SkMallocPixelRef< / a > ::< a href = '#SkMallocPixelRef_MakeAllocate' > MakeAllocate< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_installPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_installPixels' > installPixels< / a > (< a href = '#SkBitmap_installPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > void< / a > * < a href = 'SkImageInfo_Reference#SkImageInfo' > pixels< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > , < a href = '#SkBitmap_rowBytes' > void< / a > (*< a href = '#SkBitmap_rowBytes' > releaseProc< / a > )
(< a href = '#SkBitmap_rowBytes' > void< / a > * < a href = '#SkBitmap_rowBytes' > addr< / a > , < a href = '#SkBitmap_rowBytes' > void< / a > * < a href = '#SkBitmap_rowBytes' > context< / a > ) , < a href = '#SkBitmap_rowBytes' > void< / a > * < a href = '#SkBitmap_rowBytes' > context< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_installPixels_info' > info< / a > < a href = '#SkBitmap_installPixels_info' > following< / a > < a href = '#SkBitmap_installPixels_info' > the< / a > < a href = '#SkBitmap_installPixels_info' > rules< / a > < a href = '#SkBitmap_installPixels_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > (), < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > creates< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
containing < a href = '#SkBitmap_installPixels_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_pixels' > and< / a > < a href = '#SkBitmap_installPixels_rowBytes' > rowBytes< / a > . < a href = '#SkBitmap_installPixels_releaseProc' > releaseProc< / a > , < a href = '#SkBitmap_installPixels_releaseProc' > if< / a > < a href = '#SkBitmap_installPixels_releaseProc' > not< / a > < a href = '#SkBitmap_installPixels_releaseProc' > nullptr< / a > , < a href = '#SkBitmap_installPixels_releaseProc' > is< / a > < a href = '#SkBitmap_installPixels_releaseProc' > called< / a >
immediately on failure or when < a href = '#SkBitmap_installPixels_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_pixels' > are< / a > < a href = '#SkBitmap_installPixels_pixels' > no< / a > < a href = '#SkBitmap_installPixels_pixels' > longer< / a > < a href = '#SkBitmap_installPixels_pixels' > referenced< / a > . < a href = '#SkBitmap_installPixels_context' > context< / a > < a href = '#SkBitmap_installPixels_context' > may< / a > < a href = '#SkBitmap_installPixels_context' > be< / a >
2017-10-04 18:31:33 +00:00
nullptr.
2018-11-07 19:59:03 +00:00
If < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = '#SkBitmap_installPixels_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_installPixels_rowBytes' > is< / a > < a href = '#SkBitmap_installPixels_rowBytes' > less< / a > < a href = '#SkBitmap_installPixels_rowBytes' > than< / a > < a href = '#SkBitmap_installPixels_info' > info< / a > .< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > ():
calls < a href = '#SkBitmap_installPixels_releaseProc' > releaseProc< / a > < a href = '#SkBitmap_installPixels_releaseProc' > if< / a > < a href = '#SkBitmap_installPixels_releaseProc' > present< / a > , < a href = '#SkBitmap_installPixels_releaseProc' > calls< / a > < a href = '#SkBitmap_reset' > reset()< / a > , < a href = '#SkBitmap_reset' > and< / a > < a href = '#SkBitmap_reset' > returns< / a > < a href = '#SkBitmap_reset' > false< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Otherwise, if < a href = '#SkBitmap_installPixels_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_pixels' > equals< / a > < a href = '#SkBitmap_installPixels_pixels' > nullptr< / a > : < a href = '#SkBitmap_installPixels_pixels' > sets< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > calls< / a > < a href = '#SkBitmap_installPixels_releaseProc' > releaseProc< / a > < a href = '#SkBitmap_installPixels_releaseProc' > if< / a >
2017-10-04 18:31:33 +00:00
present, returns true.
2018-11-07 19:59:03 +00:00
If < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > is< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = '#SkBitmap_installPixels_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_pixels' > is< / a > < a href = '#SkBitmap_installPixels_pixels' > not< / a > < a href = '#SkBitmap_installPixels_pixels' > nullptr< / a > , < a href = '#SkBitmap_installPixels_pixels' > and< / a > < a href = '#SkBitmap_installPixels_releaseProc' > releaseProc< / a > < a href = '#SkBitmap_installPixels_releaseProc' > is< / a > < a href = '#SkBitmap_installPixels_releaseProc' > not< / a > < a href = '#SkBitmap_installPixels_releaseProc' > nullptr< / a > :
when < a href = '#SkBitmap_installPixels_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_pixels' > are< / a > < a href = '#SkBitmap_installPixels_pixels' > no< / a > < a href = '#SkBitmap_installPixels_pixels' > longer< / a > < a href = '#SkBitmap_installPixels_pixels' > referenced< / a > , < a href = '#SkBitmap_installPixels_pixels' > calls< / a > < a href = '#SkBitmap_installPixels_releaseProc' > releaseProc< / a > < a href = '#SkBitmap_installPixels_releaseProc' > with< / a > < a href = '#SkBitmap_installPixels_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_pixels' > and< / a > < a href = '#SkBitmap_installPixels_context' > context< / a >
2017-10-04 18:31:33 +00:00
as parameters.
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_installPixels_info' > < code > < strong > info< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > contains width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_installPixels_pixels' > < code > < strong > pixels< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > address or < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > ; < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_installPixels_rowBytes' > < code > < strong > rowBytes< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > of< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > larger< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_installPixels_releaseProc' > < code > < strong > releaseProc< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > function called when < a href = '#SkBitmap_installPixels_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_pixels' > can< / a > < a href = '#SkBitmap_installPixels_pixels' > be< / a > < a href = '#SkBitmap_installPixels_pixels' > deleted< / a > ; < a href = '#SkBitmap_installPixels_pixels' > may< / a > < a href = '#SkBitmap_installPixels_pixels' > be< / a > < a href = '#SkBitmap_installPixels_pixels' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_installPixels_context' > < code > < strong > context< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > caller state passed to < a href = '#SkBitmap_installPixels_releaseProc' > releaseProc< / a > ; < a href = '#SkBitmap_installPixels_releaseProc' > may< / a > < a href = '#SkBitmap_installPixels_releaseProc' > be< / a > < a href = '#SkBitmap_installPixels_releaseProc' > nullptr< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > is< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_installPixels_info' > info< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "8c4f7bf73fffa1a812ee8e88e44e639c" > < div > < a href = '#SkBitmap_installPixels_releaseProc' > releaseProc< / a > < a href = '#SkBitmap_installPixels_releaseProc' > is< / a > < a href = '#SkBitmap_installPixels_releaseProc' > called< / a > < a href = '#SkBitmap_installPixels_releaseProc' > immediately< / a > < a href = '#SkBitmap_installPixels_releaseProc' > because< / a > < a href = '#SkBitmap_installPixels_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_installPixels_rowBytes' > is< / a > < a href = '#SkBitmap_installPixels_rowBytes' > too< / a > < a href = '#SkBitmap_installPixels_rowBytes' > small< / a > < a href = '#SkBitmap_installPixels_rowBytes' > for< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a > .
2018-03-05 18:26:16 +00:00
< / div >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
before installPixels
releaseProc called
install not successful
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixels' > allocPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_installPixels_2' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_installPixels' > installPixels< / a > (< a href = '#SkBitmap_installPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > info< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > void< / a > * < a href = 'SkImageInfo_Reference#SkImageInfo' > pixels< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_installPixels_2_info' > info< / a > < a href = '#SkBitmap_installPixels_2_info' > following< / a > < a href = '#SkBitmap_installPixels_2_info' > the< / a > < a href = '#SkBitmap_installPixels_2_info' > rules< / a > < a href = '#SkBitmap_installPixels_2_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > (), < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > creates< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
containing < a href = '#SkBitmap_installPixels_2_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_2_pixels' > and< / a > < a href = '#SkBitmap_installPixels_2_rowBytes' > rowBytes< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
If < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = '#SkBitmap_installPixels_2_rowBytes' > rowBytes< / a > < a href = '#SkBitmap_installPixels_2_rowBytes' > is< / a > < a href = '#SkBitmap_installPixels_2_rowBytes' > less< / a > < a href = '#SkBitmap_installPixels_2_rowBytes' > than< / a > < a href = '#SkBitmap_installPixels_2_info' > info< / a > .< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > ():
calls < a href = '#SkBitmap_reset' > reset()< / a > , < a href = '#SkBitmap_reset' > and< / a > < a href = '#SkBitmap_reset' > returns< / a > < a href = '#SkBitmap_reset' > false< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Otherwise, if < a href = '#SkBitmap_installPixels_2_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_2_pixels' > equals< / a > < a href = '#SkBitmap_installPixels_2_pixels' > nullptr< / a > : < a href = '#SkBitmap_installPixels_2_pixels' > sets< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > returns< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > true< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Caller must ensure that < a href = '#SkBitmap_installPixels_2_pixels' > pixels< / a > < a href = '#SkBitmap_installPixels_2_pixels' > are< / a > < a href = '#SkBitmap_installPixels_2_pixels' > valid< / a > < a href = '#SkBitmap_installPixels_2_pixels' > for< / a > < a href = '#SkBitmap_installPixels_2_pixels' > the< / a > < a href = '#SkBitmap_installPixels_2_pixels' > lifetime< / a > < a href = '#SkBitmap_installPixels_2_pixels' > of< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > and< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_installPixels_2_info' > < code > < strong > info< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > contains width, height, < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > , < a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_installPixels_2_pixels' > < code > < strong > pixels< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > address or < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > ; < a href = 'undocumented#Pixel' > may< / a > < a href = 'undocumented#Pixel' > be< / a > < a href = 'undocumented#Pixel' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_installPixels_2_rowBytes' > < code > < strong > rowBytes< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > of< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > row< / a > < a href = 'undocumented#Pixel' > or< / a > < a href = 'undocumented#Pixel' > larger< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > is< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_installPixels_2_info' > info< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "a7e04447b2081010c50d7920e80a6bb2" > < div > GPU does not support < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > kUnpremul_SkAlphaType< / a > , < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > does< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > not< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > assert< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > that< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > it< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > does< / a > < a href = 'SkImageInfo_Reference#kUnpremul_SkAlphaType' > not< / a > .
2018-03-05 18:26:16 +00:00
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixels' > allocPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_installPixels_3' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_installPixels' > installPixels< / a > (< a href = '#SkBitmap_installPixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#Pixmap' > pixmap< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > pixmap< / a > .< a href = '#SkPixmap_info' > info()< / a > < a href = '#SkPixmap_info' > following< / a > < a href = '#SkPixmap_info' > the< / a > < a href = '#SkPixmap_info' > rules< / a > < a href = '#SkPixmap_info' > in< / a > < a href = '#SkBitmap_setInfo' > setInfo< / a > (), < a href = '#SkBitmap_setInfo' > and< / a > < a href = '#SkBitmap_setInfo' > creates< / a >
< a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > containing< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > pixmap< / a > .< a href = '#SkPixmap_addr' > addr()< / a > < a href = '#SkPixmap_addr' > and< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > pixmap< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > ().
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
If < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > could< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > not< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > be< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > or< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > pixmap< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > is< / a > < a href = '#SkPixmap_rowBytes' > less< / a > < a href = '#SkPixmap_rowBytes' > than< / a >
< a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > (): < a href = '#SkImageInfo_minRowBytes' > calls< / a > < a href = '#SkBitmap_reset' > reset()< / a > , < a href = '#SkBitmap_reset' > and< / a > < a href = '#SkBitmap_reset' > returns< / a > < a href = '#SkBitmap_reset' > false< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Otherwise, if < a href = '#SkBitmap_installPixels_3_pixmap' > pixmap< / a > .< a href = '#SkPixmap_addr' > addr()< / a > < a href = '#SkPixmap_addr' > equals< / a > < a href = '#SkPixmap_addr' > nullptr< / a > : < a href = '#SkPixmap_addr' > sets< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > returns< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > true< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Caller must ensure that < a href = '#SkBitmap_installPixels_3_pixmap' > pixmap< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > is< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > valid< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > for< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > the< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > lifetime< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > of< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > and< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_installPixels_3_pixmap' > < code > < strong > pixmap< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > , < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a > , < a href = 'undocumented#Pixel' > and< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > ()< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > was< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > set< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_installPixels_3_pixmap' > pixmap< / a > .< a href = '#SkPixmap_info' > info()< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "6e2a8c9358b34aebd2ec586815fe9d3a" > < div > Draw a five by five < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > , < a href = 'SkBitmap_Reference#Bitmap' > and< / a > < a href = 'SkBitmap_Reference#Bitmap' > draw< / a > < a href = 'SkBitmap_Reference#Bitmap' > it< / a > < a href = 'SkBitmap_Reference#Bitmap' > again< / a > < a href = 'SkBitmap_Reference#Bitmap' > with< / a > < a href = 'SkBitmap_Reference#Bitmap' > a< / a > < a href = 'SkBitmap_Reference#Bitmap' > center< / a > < a href = 'SkBitmap_Reference#Bitmap' > white< / a > < a href = 'undocumented#Pixel' > pixel< / a > .
2018-03-05 18:26:16 +00:00
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixels' > allocPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_installMaskPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_installMaskPixels' > installMaskPixels< / a > (< a href = '#SkBitmap_installMaskPixels' > const< / a > < a href = 'undocumented#SkMask' > SkMask< / a > & < a href = 'undocumented#SkMask' > mask< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-09-06 16:47:04 +00:00
To be deprecated soon.
2017-10-04 18:31:33 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Pixels' > < / a >
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_setPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_setPixels' > setPixels< / a > (< a href = '#SkBitmap_setPixels' > void< / a > * < a href = '#SkBitmap_setPixels' > pixels< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Replaces < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > with< / a > < a href = '#SkBitmap_setPixels_pixels' > pixels< / a > , < a href = '#SkBitmap_setPixels_pixels' > preserving< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > ().
Sets < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > origin< / a > < a href = 'undocumented#SkPixelRef' > to< / a > (0, 0).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
If < a href = '#SkBitmap_setPixels_pixels' > pixels< / a > < a href = '#SkBitmap_setPixels_pixels' > is< / a > < a href = '#SkBitmap_setPixels_pixels' > nullptr< / a > , < a href = '#SkBitmap_setPixels_pixels' > or< / a > < a href = '#SkBitmap_setPixels_pixels' > if< / a > < a href = '#SkBitmap_info' > info()< / a > .< a href = '#SkImageInfo_colorType' > colorType< / a > () < a href = '#SkImageInfo_colorType' > equals< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > ;
release reference to < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > , < a href = 'undocumented#SkPixelRef' > and< / a > < a href = 'undocumented#SkPixelRef' > set< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > to< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Caller is responsible for handling ownership < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > for< / a > < a href = 'undocumented#Pixel' > the< / a > < a href = 'undocumented#Pixel' > lifetime< / a >
of < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > and< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_setPixels_pixels' > < code > < strong > pixels< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > address of < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > , < a href = 'undocumented#Pixel' > managed< / a > < a href = 'undocumented#Pixel' > by< / a > < a href = 'undocumented#Pixel' > caller< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
< div > < fiddle-embed name = "f0db16e06c9a1436917c8179f8c1718f" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_installPixels' > installPixels< / a > < a href = '#SkBitmap_allocPixels' > allocPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_tryAllocPixels_3' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-10-08 18:57:48 +00:00
bool < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > ()
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Allocates < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > with< / a > < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > , < a href = '#SkBitmap_HeapAllocator' > and< / a > < a href = '#SkBitmap_HeapAllocator' > replaces< / a > < a href = '#SkBitmap_HeapAllocator' > existing< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
The allocation < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > is< / a > < a href = 'undocumented#Size' > determined< / a > < a href = 'undocumented#Size' > by< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > width< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > height< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns false if < a href = '#SkBitmap_info' > info()< / a > .< a href = '#SkImageInfo_colorType' > colorType< / a > () < a href = '#SkImageInfo_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > allocation< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > fails< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
true if the allocation succeeds
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "720e4c053fae9e929ab6518b47e49370" > < div > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > hosts< / a > < a href = 'SkBitmap_Reference#Bitmap' > and< / a > < a href = 'SkBitmap_Reference#Bitmap' > draws< / a > < a href = 'SkBitmap_Reference#Bitmap' > gray< / a > < a href = 'SkBitmap_Reference#Bitmap' > values< / a > < a href = 'SkBitmap_Reference#Bitmap' > in< / a > < a href = 'SkBitmap_Reference#Bitmap' > set1< / a > . < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > < a href = '#SkBitmap_tryAllocPixels' > replaces< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a >
< a href = '#Pixel_Ref' > and< / a > < a href = '#Pixel_Ref' > erases< / a > < a href = '#Pixel_Ref' > it< / a > < a href = '#Pixel_Ref' > to< / a > < a href = '#Pixel_Ref' > black< / a > , < a href = '#Pixel_Ref' > but< / a > < a href = '#Pixel_Ref' > does< / a > < a href = '#Pixel_Ref' > not< / a > < a href = '#Pixel_Ref' > alter< / a > < a href = '#Pixel_Ref' > set1< / a > . < a href = '#SkBitmap_setPixels' > setPixels< / a > < a href = '#SkBitmap_setPixels' > replaces< / a > < a href = '#SkBitmap_setPixels' > black< / a >
< a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > with< / a > < a href = '#Pixel_Ref' > set1< / a > .
2018-03-05 18:26:16 +00:00
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixels' > allocPixels< / a > < a href = '#SkBitmap_installPixels' > installPixels< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_allocPixels_3' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
void < a href = '#SkBitmap_allocPixels' > allocPixels< / a > ()
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Allocates < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > with< / a > < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > , < a href = '#SkBitmap_HeapAllocator' > and< / a > < a href = '#SkBitmap_HeapAllocator' > replaces< / a > < a href = '#SkBitmap_HeapAllocator' > existing< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
The allocation < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > is< / a > < a href = 'undocumented#Size' > determined< / a > < a href = 'undocumented#Size' > by< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > width< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > height< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Aborts if < a href = '#SkBitmap_info' > info()< / a > .< a href = '#SkImageInfo_colorType' > colorType< / a > () < a href = '#SkImageInfo_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > allocation< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > fails< / a > .
2017-11-27 15:44:06 +00:00
Abort steps may be provided by the user at compile
2018-01-04 21:11:51 +00:00
time by defining SK_ABORT.
2017-10-04 18:31:33 +00:00
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "1219b38c788bf270fb20f8cd2d78cff8" > < div > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > hosts< / a > < a href = 'SkBitmap_Reference#Bitmap' > and< / a > < a href = 'SkBitmap_Reference#Bitmap' > draws< / a > < a href = 'SkBitmap_Reference#Bitmap' > gray< / a > < a href = 'SkBitmap_Reference#Bitmap' > values< / a > < a href = 'SkBitmap_Reference#Bitmap' > in< / a > < a href = 'SkBitmap_Reference#Bitmap' > set1< / a > . < a href = '#SkBitmap_allocPixels' > allocPixels< / a > < a href = '#SkBitmap_allocPixels' > replaces< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a >
< a href = '#Pixel_Ref' > and< / a > < a href = '#Pixel_Ref' > erases< / a > < a href = '#Pixel_Ref' > it< / a > < a href = '#Pixel_Ref' > to< / a > < a href = '#Pixel_Ref' > black< / a > , < a href = '#Pixel_Ref' > but< / a > < a href = '#Pixel_Ref' > does< / a > < a href = '#Pixel_Ref' > not< / a > < a href = '#Pixel_Ref' > alter< / a > < a href = '#Pixel_Ref' > set1< / a > . < a href = '#SkBitmap_setPixels' > setPixels< / a > < a href = '#SkBitmap_setPixels' > replaces< / a > < a href = '#SkBitmap_setPixels' > black< / a >
< a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > with< / a > < a href = '#Pixel_Ref' > set2< / a > .
2018-03-05 18:26:16 +00:00
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > < a href = '#SkBitmap_installPixels' > installPixels< / a > < a href = '#SkBitmap_setPixels' > setPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_tryAllocPixels_4' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_tryAllocPixels' > tryAllocPixels< / a > (< a href = '#SkBitmap_Allocator' > Allocator< / a > * < a href = '#SkBitmap_Allocator' > allocator< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Allocates < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > with< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > allocator< / a > , < a href = '#SkBitmap_tryAllocPixels_4_allocator' > and< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > replaces< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > existing< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
The allocation < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > is< / a > < a href = 'undocumented#Size' > determined< / a > < a href = 'undocumented#Size' > by< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > width< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > height< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > .
If < a href = '#SkBitmap_tryAllocPixels_4_allocator' > allocator< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > is< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > nullptr< / a > , < a href = '#SkBitmap_tryAllocPixels_4_allocator' > use< / a > < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > < a href = '#SkBitmap_HeapAllocator' > instead< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns false if < a href = '#SkBitmap_Allocator' > Allocator< / a > ::< a href = '#SkBitmap_Allocator_allocPixelRef' > allocPixelRef< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > return< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > false< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_tryAllocPixels_4_allocator' > < code > < strong > allocator< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > instance of < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > ::< a href = '#SkBitmap_Allocator' > Allocator< / a > < a href = '#SkBitmap_Allocator' > instantiation< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if custom < a href = '#SkBitmap_tryAllocPixels_4_allocator' > allocator< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > reports< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > success< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "eb6f861ca1839146d26e40d56c2a001c" > < div > < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > < a href = '#SkBitmap_HeapAllocator' > limits< / a > < a href = '#SkBitmap_HeapAllocator' > the< / a > < a href = '#SkBitmap_HeapAllocator' > maximum< / a > < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > of< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > to< / a > < a href = 'SkBitmap_Reference#Bitmap' > two< / a > < a href = 'SkBitmap_Reference#Bitmap' > gigabytes< / a > . < a href = 'SkBitmap_Reference#Bitmap' > Using< / a >
< a href = 'SkBitmap_Reference#Bitmap' > a< / a > < a href = 'SkBitmap_Reference#Bitmap' > custom< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > allocator< / a > , < a href = '#SkBitmap_tryAllocPixels_4_allocator' > this< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > limitation< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > may< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > be< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > relaxed< / a > . < a href = '#SkBitmap_tryAllocPixels_4_allocator' > This< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > example< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > can< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > be< / a >
< a href = '#SkBitmap_tryAllocPixels_4_allocator' > modified< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > to< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > allocate< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > an< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > eight< / a > < a href = '#SkBitmap_tryAllocPixels_4_allocator' > gigabyte< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > on< / a > < a href = 'SkBitmap_Reference#Bitmap' > a< / a > 64-< a href = 'SkBitmap_Reference#Bitmap' > bit< / a > < a href = 'SkBitmap_Reference#Bitmap' > platform< / a > < a href = 'SkBitmap_Reference#Bitmap' > with< / a >
< a href = 'SkBitmap_Reference#Bitmap' > sufficient< / a > < a href = 'SkBitmap_Reference#Bitmap' > memory< / a > .
2018-03-05 18:26:16 +00:00
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixels' > allocPixels< / a > < a href = '#SkBitmap_Allocator' > Allocator< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_allocPixels_4' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_allocPixels' > allocPixels< / a > (< a href = '#SkBitmap_Allocator' > Allocator< / a > * < a href = '#SkBitmap_Allocator' > allocator< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Allocates < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > memory< / a > < a href = 'undocumented#Pixel' > with< / a > < a href = '#SkBitmap_allocPixels_4_allocator' > allocator< / a > , < a href = '#SkBitmap_allocPixels_4_allocator' > and< / a > < a href = '#SkBitmap_allocPixels_4_allocator' > replaces< / a > < a href = '#SkBitmap_allocPixels_4_allocator' > existing< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
The allocation < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > is< / a > < a href = 'undocumented#Size' > determined< / a > < a href = 'undocumented#Size' > by< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > width< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > height< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > and< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > .
If < a href = '#SkBitmap_allocPixels_4_allocator' > allocator< / a > < a href = '#SkBitmap_allocPixels_4_allocator' > is< / a > < a href = '#SkBitmap_allocPixels_4_allocator' > nullptr< / a > , < a href = '#SkBitmap_allocPixels_4_allocator' > use< / a > < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > < a href = '#SkBitmap_HeapAllocator' > instead< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Aborts if < a href = '#SkBitmap_Allocator' > Allocator< / a > ::< a href = '#SkBitmap_Allocator_allocPixelRef' > allocPixelRef< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > return< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > false< / a > . < a href = '#SkBitmap_Allocator_allocPixelRef' > Abort< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > steps< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > may< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > be< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > provided< / a > < a href = '#SkBitmap_Allocator_allocPixelRef' > by< / a >
2018-01-04 21:11:51 +00:00
the user at compile time by defining SK_ABORT.
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_allocPixels_4_allocator' > < code > < strong > allocator< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > instance of < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > ::< a href = '#SkBitmap_Allocator' > Allocator< / a > < a href = '#SkBitmap_Allocator' > instantiation< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
< div > < fiddle-embed name = "1b2800d23c9ea249b45c2c21a34b6d14" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_allocPixels' > allocPixels< / a > < a href = '#SkBitmap_Allocator' > Allocator< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_pixelRef' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > * < a href = '#SkBitmap_pixelRef' > pixelRef< / a > () < a href = '#SkBitmap_pixelRef' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > , < a href = 'undocumented#SkPixelRef' > which< / a > < a href = 'undocumented#SkPixelRef' > contains< / a > : < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > base< / a > < a href = 'undocumented#Pixel' > address< / a > ; < a href = 'undocumented#Pixel' > its< / a > < a href = 'undocumented#Pixel' > dimensions< / a > ; < a href = 'undocumented#Pixel' > and< / a >
< a href = '#SkBitmap_rowBytes' > rowBytes< / a > (), < a href = '#SkBitmap_rowBytes' > the< / a > < a href = '#SkBitmap_rowBytes' > interval< / a > < a href = '#SkBitmap_rowBytes' > from< / a > < a href = '#SkBitmap_rowBytes' > one< / a > < a href = '#SkBitmap_rowBytes' > row< / a > < a href = '#SkBitmap_rowBytes' > to< / a > < a href = '#SkBitmap_rowBytes' > the< / a > < a href = '#SkBitmap_rowBytes' > next< / a > . < a href = '#SkBitmap_rowBytes' > Does< / a > < a href = '#SkBitmap_rowBytes' > not< / a > < a href = '#SkBitmap_rowBytes' > change< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
reference count. < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > may< / a > < a href = 'undocumented#SkPixelRef' > be< / a > < a href = 'undocumented#SkPixelRef' > shared< / a > < a href = 'undocumented#SkPixelRef' > by< / a > < a href = 'undocumented#SkPixelRef' > multiple< / a > < a href = 'SkBitmap_Reference#Bitmap' > bitmaps< / a > .
If < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > has< / a > < a href = 'undocumented#SkPixelRef' > not< / a > < a href = 'undocumented#SkPixelRef' > been< / a > < a href = 'undocumented#SkPixelRef' > set< / a > , < a href = 'undocumented#SkPixelRef' > returns< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > , < a href = 'undocumented#SkPixelRef' > or< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-11 05:28:17 +00:00
< div > < fiddle-embed name = "5db2d30870a7cc45f28e22578d1880c3" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_getPixels' > getPixels< / a > < a href = '#SkBitmap_getAddr' > getAddr< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_pixelRefOrigin' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkIPoint_Reference#SkIPoint' > SkIPoint< / a > < a href = '#SkBitmap_pixelRefOrigin' > pixelRefOrigin< / a > () < a href = '#SkBitmap_pixelRefOrigin' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns origin of pixels within < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > bounds< / a > < a href = 'SkBitmap_Reference#SkBitmap' > is< / a > < a href = 'SkBitmap_Reference#SkBitmap' > always< / a > < a href = 'SkBitmap_Reference#SkBitmap' > contained< / a >
by < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > bounds< / a > , < a href = 'undocumented#SkPixelRef' > which< / a > < a href = 'undocumented#SkPixelRef' > may< / a > < a href = 'undocumented#SkPixelRef' > be< / a > < a href = 'undocumented#SkPixelRef' > the< / a > < a href = 'undocumented#SkPixelRef' > same< / a > < a href = 'undocumented#Size' > size< / a > < a href = 'undocumented#Size' > or< / a > < a href = 'undocumented#Size' > larger< / a > . < a href = 'undocumented#Size' > Multiple< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a >
can share the same < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > , < a href = 'undocumented#SkPixelRef' > where< / a > < a href = 'undocumented#SkPixelRef' > each< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > has< / a > < a href = 'SkBitmap_Reference#SkBitmap' > different< / a > < a href = 'SkBitmap_Reference#SkBitmap' > bounds< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
The returned origin added to < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > dimensions< / a > < a href = 'SkBitmap_Reference#SkBitmap' > equals< / a > < a href = 'SkBitmap_Reference#SkBitmap' > or< / a > < a href = 'SkBitmap_Reference#SkBitmap' > is< / a > < a href = 'SkBitmap_Reference#SkBitmap' > smaller< / a > < a href = 'SkBitmap_Reference#SkBitmap' > than< / a > < a href = 'SkBitmap_Reference#SkBitmap' > the< / a >
< a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > dimensions< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Returns (0, 0) if < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > origin< / a > < a href = 'undocumented#Pixel' > within< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-03 05:29:30 +00:00
< div > < fiddle-embed name = "6d31686c6c0829c70f284ae716526d6a" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
source origin: 0, 0
subset origin: 32, 64
~~~~
< / fiddle-embed > < / div >
2017-11-02 21:49:34 +00:00
### See Also
2018-05-16 11:07:07 +00:00
< a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = '#SkBitmap_getSubset' > getSubset< / a > < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a >
2017-11-02 21:49:34 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Set' > < / a >
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_setPixelRef' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_setPixelRef' > setPixelRef< / a > (< a href = 'undocumented#sk_sp' > sk_sp< / a > & < a href = 'undocumented#sk_sp' > lt< / a > ;< a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > & < a href = 'undocumented#SkPixelRef' > gt< / a > ; < a href = '#SkBitmap_pixelRef' > pixelRef< / a > , < a href = '#SkBitmap_pixelRef' > int< / a > < a href = '#SkBitmap_pixelRef' > dx< / a > , < a href = '#SkBitmap_pixelRef' > int< / a > < a href = '#SkBitmap_pixelRef' > dy< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Replaces < a href = '#SkBitmap_setPixelRef_pixelRef' > pixelRef< / a > < a href = '#SkBitmap_setPixelRef_pixelRef' > and< / a > < a href = '#SkBitmap_setPixelRef_pixelRef' > origin< / a > < a href = '#SkBitmap_setPixelRef_pixelRef' > in< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > . < a href = '#SkBitmap_setPixelRef_dx' > dx< / a > < a href = '#SkBitmap_setPixelRef_dx' > and< / a > < a href = '#SkBitmap_setPixelRef_dy' > dy< / a > < a href = '#SkBitmap_setPixelRef_dy' > specify< / a > < a href = '#SkBitmap_setPixelRef_dy' > the< / a > < a href = '#SkBitmap_setPixelRef_dy' > offset< / a >
within the < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > pixels< / a > < a href = 'undocumented#SkPixelRef' > for< / a > < a href = 'undocumented#SkPixelRef' > the< / a > < a href = 'undocumented#SkPixelRef' > top-left< / a > < a href = 'undocumented#SkPixelRef' > corner< / a > < a href = 'undocumented#SkPixelRef' > of< / a > < a href = 'undocumented#SkPixelRef' > the< / a > < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Asserts in debug builds if < a href = '#SkBitmap_setPixelRef_dx' > dx< / a > < a href = '#SkBitmap_setPixelRef_dx' > or< / a > < a href = '#SkBitmap_setPixelRef_dy' > dy< / a > < a href = '#SkBitmap_setPixelRef_dy' > are< / a > < a href = '#SkBitmap_setPixelRef_dy' > out< / a > < a href = '#SkBitmap_setPixelRef_dy' > of< / a > < a href = '#SkBitmap_setPixelRef_dy' > range< / a > . < a href = '#SkBitmap_setPixelRef_dy' > Pins< / a > < a href = '#SkBitmap_setPixelRef_dx' > dx< / a > < a href = '#SkBitmap_setPixelRef_dx' > and< / a > < a href = '#SkBitmap_setPixelRef_dy' > dy< / a >
2017-10-04 18:31:33 +00:00
to legal range in release builds.
The caller is responsible for ensuring that the pixels match the
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > and< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > SkAlphaType< / a > < a href = 'SkImageInfo_Reference#SkAlphaType' > in< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_setPixelRef_pixelRef' > < code > < strong > pixelRef< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > describing< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a > < a href = 'undocumented#Pixel' > and< / a > < a href = '#SkBitmap_rowBytes' > rowBytes< / a > ()< / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_setPixelRef_dx' > < code > < strong > dx< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > column offset in < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > for< / a > < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > origin< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_setPixelRef_dy' > < code > < strong > dy< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > row offset in < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > for< / a > < a href = 'SkBitmap_Reference#Bitmap' > bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > origin< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
2018-11-07 19:59:03 +00:00
< div > < fiddle-embed name = "f98cc0451c6e77a8833d261c9a484c5f" > < div > Treating 32-bit < a href = 'undocumented#Data' > data< / a > < a href = 'undocumented#Data' > as< / a > 8-< a href = 'undocumented#Data' > bit< / a > < a href = 'undocumented#Data' > data< / a > < a href = 'undocumented#Data' > is< / a > < a href = 'undocumented#Data' > unlikely< / a > < a href = 'undocumented#Data' > to< / a > < a href = 'undocumented#Data' > produce< / a > < a href = 'undocumented#Data' > useful< / a > < a href = 'undocumented#Data' > results< / a > .
2018-03-05 18:26:16 +00:00
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_setInfo' > setInfo< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_readyToDraw' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_readyToDraw' > readyToDraw< / a > () < a href = '#SkBitmap_readyToDraw' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns true if < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > is< / a > < a href = 'SkBitmap_Reference#SkBitmap' > can< / a > < a href = 'SkBitmap_Reference#SkBitmap' > be< / a > < a href = 'SkBitmap_Reference#SkBitmap' > drawn< / a > .
2017-10-04 18:31:33 +00:00
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = '#SkBitmap_getPixels' > getPixels< / a > () < a href = '#SkBitmap_getPixels' > is< / a > < a href = '#SkBitmap_getPixels' > not< / a > < a href = '#SkBitmap_getPixels' > nullptr< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "e89c78ca992e2e789ed50944fe68f920" > < / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_getPixels' > getPixels< / a > < a href = '#SkBitmap_drawsNothing' > drawsNothing< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getGenerationID' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
uint32_t < a href = '#SkBitmap_getGenerationID' > getGenerationID< / a > () < a href = '#SkBitmap_getGenerationID' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-10-31 16:14:03 +00:00
Returns a unique value corresponding to the pixels in < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
2018-11-07 19:59:03 +00:00
Returns a different value after < a href = '#SkBitmap_notifyPixelsChanged' > notifyPixelsChanged< / a > () < a href = '#SkBitmap_notifyPixelsChanged' > has< / a > < a href = '#SkBitmap_notifyPixelsChanged' > been< / a > < a href = '#SkBitmap_notifyPixelsChanged' > called< / a > .
Returns zero if < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > .
2017-10-04 18:31:33 +00:00
Determines if pixels have changed since last examined.
### Return Value
2018-10-31 16:14:03 +00:00
unique value for pixels in < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "db9dd91e0207c3941c09538555817b4b" >
#### Example Output
~~~~
#Volatile
empty id 0
alloc id 4
erase id 6
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_notifyPixelsChanged' > notifyPixelsChanged< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_notifyPixelsChanged' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_notifyPixelsChanged' > notifyPixelsChanged< / a > () < a href = '#SkBitmap_notifyPixelsChanged' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Marks that pixels in < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > have< / a > < a href = 'undocumented#SkPixelRef' > changed< / a > . < a href = 'undocumented#SkPixelRef' > Subsequent< / a > < a href = 'undocumented#SkPixelRef' > calls< / a > < a href = 'undocumented#SkPixelRef' > to< / a >
< a href = '#SkBitmap_getGenerationID' > getGenerationID< / a > () < a href = '#SkBitmap_getGenerationID' > return< / a > < a href = '#SkBitmap_getGenerationID' > a< / a > < a href = '#SkBitmap_getGenerationID' > different< / a > < a href = '#SkBitmap_getGenerationID' > value< / a > .
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "8f463ed17b0ed4fb9c503a0ec71706f9" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getGenerationID' > getGenerationID< / a > < a href = '#SkBitmap_isVolatile' > isVolatile< / a > < a href = '#Pixel_Ref' > Pixel_Ref< / a >
2017-10-04 18:31:33 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Draw' > < / a >
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_eraseColor' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_eraseColor' > eraseColor< / a > (< a href = 'SkColor_Reference#SkColor' > SkColor< / a > < a href = 'SkColor_Reference#SkColor' > c< / a > ) < a href = 'SkColor_Reference#SkColor' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Replaces < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > values< / a > < a href = 'undocumented#Pixel' > with< / a > < a href = '#SkBitmap_eraseColor_c' > c< / a > . < a href = '#SkBitmap_eraseColor_c' > All< / a > < a href = '#SkBitmap_eraseColor_c' > pixels< / a > < a href = '#SkBitmap_eraseColor_c' > contained< / a > < a href = '#SkBitmap_eraseColor_c' > by< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > < a href = '#SkBitmap_bounds' > are< / a > < a href = '#SkBitmap_bounds' > affected< / a > .
If the < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > then< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a >
is ignored; RGB is treated as opaque. If < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > ,
2018-05-17 16:17:28 +00:00
then RGB is ignored.
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_eraseColor_c' > < code > < strong > c< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > < a href = 'undocumented#Unpremultiply' > unpremultiplied< / a > < a href = 'SkColor_Reference#Color' > color< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "418928dbfffa9eb00c8225530f44baf5" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_eraseARGB' > eraseARGB< / a > < a href = '#SkBitmap_erase' > erase< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_eraseARGB' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_eraseARGB' > eraseARGB< / a > (< a href = 'undocumented#U8CPU' > U8CPU< / a > < a href = 'undocumented#U8CPU' > a< / a > , < a href = 'undocumented#U8CPU' > U8CPU< / a > < a href = 'undocumented#U8CPU' > r< / a > , < a href = 'undocumented#U8CPU' > U8CPU< / a > < a href = 'undocumented#U8CPU' > g< / a > , < a href = 'undocumented#U8CPU' > U8CPU< / a > < a href = 'undocumented#U8CPU' > b< / a > ) < a href = 'undocumented#U8CPU' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Replaces < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > values< / a > < a href = 'undocumented#Pixel' > with< / a > < a href = 'undocumented#Unpremultiply' > unpremultiplied< / a > < a href = 'SkColor_Reference#Color' > color< / a > < a href = 'SkColor_Reference#Color' > built< / a > < a href = 'SkColor_Reference#Color' > from< / a > < a href = '#SkBitmap_eraseARGB_a' > a< / a > , < a href = '#SkBitmap_eraseARGB_r' > r< / a > , < a href = '#SkBitmap_eraseARGB_g' > g< / a > , < a href = '#SkBitmap_eraseARGB_g' > and< / a > < a href = '#SkBitmap_eraseARGB_b' > b< / a > .
All pixels contained by < a href = '#SkBitmap_bounds' > bounds()< / a > < a href = '#SkBitmap_bounds' > are< / a > < a href = '#SkBitmap_bounds' > affected< / a > .
If the < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > then< / a > < a href = '#SkBitmap_eraseARGB_a' > a< / a >
is ignored; < a href = '#SkBitmap_eraseARGB_r' > r< / a > , < a href = '#SkBitmap_eraseARGB_g' > g< / a > , < a href = '#SkBitmap_eraseARGB_g' > and< / a > < a href = '#SkBitmap_eraseARGB_b' > b< / a > < a href = '#SkBitmap_eraseARGB_b' > are< / a > < a href = '#SkBitmap_eraseARGB_b' > treated< / a > < a href = '#SkBitmap_eraseARGB_b' > as< / a > < a href = '#SkBitmap_eraseARGB_b' > opaque< / a > . < a href = '#SkBitmap_eraseARGB_b' > If< / a > < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > ,
then < a href = '#SkBitmap_eraseARGB_r' > r< / a > , < a href = '#SkBitmap_eraseARGB_g' > g< / a > , < a href = '#SkBitmap_eraseARGB_g' > and< / a > < a href = '#SkBitmap_eraseARGB_b' > b< / a > < a href = '#SkBitmap_eraseARGB_b' > are< / a > < a href = '#SkBitmap_eraseARGB_b' > ignored< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_eraseARGB_a' > < code > < strong > a< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > amount of < a href = 'SkColor_Reference#Alpha' > alpha< / a > , < a href = 'SkColor_Reference#Alpha' > from< / a > < a href = 'SkColor_Reference#Alpha' > fully< / a > < a href = 'SkColor_Reference#Alpha' > transparent< / a > (0) < a href = 'SkColor_Reference#Alpha' > to< / a > < a href = 'SkColor_Reference#Alpha' > fully< / a > < a href = 'SkColor_Reference#Alpha' > opaque< / a > (255)< / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_eraseARGB_r' > < code > < strong > r< / strong > < / code > < / a > < / td >
2018-05-17 16:17:28 +00:00
< td > amount of red, from no red (0) to full red (255)< / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_eraseARGB_g' > < code > < strong > g< / strong > < / code > < / a > < / td >
2018-05-17 16:17:28 +00:00
< td > amount of green, from no green (0) to full green (255)< / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_eraseARGB_b' > < code > < strong > b< / strong > < / code > < / a > < / td >
2018-05-17 16:17:28 +00:00
< td > amount of blue, from no blue (0) to full blue (255)< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "67277b0a1003f340473a35982533561c" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_eraseColor' > eraseColor< / a > < a href = '#SkBitmap_erase' > erase< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_erase' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_erase' > erase< / a > (< a href = 'SkColor_Reference#SkColor' > SkColor< / a > < a href = 'SkColor_Reference#SkColor' > c< / a > , < a href = 'SkColor_Reference#SkColor' > const< / a > < a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > & < a href = 'SkIRect_Reference#SkIRect' > area< / a > ) < a href = 'SkIRect_Reference#SkIRect' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Replaces < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > values< / a > < a href = 'undocumented#Pixel' > inside< / a > < a href = '#SkBitmap_erase_area' > area< / a > < a href = '#SkBitmap_erase_area' > with< / a > < a href = '#SkBitmap_erase_c' > c< / a > . < a href = '#SkBitmap_erase_c' > If< / a > < a href = '#SkBitmap_erase_area' > area< / a > < a href = '#SkBitmap_erase_area' > does< / a > < a href = '#SkBitmap_erase_area' > not< / a > < a href = '#SkBitmap_erase_area' > intersect< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > ,
2017-10-04 18:31:33 +00:00
call has no effect.
2018-11-07 19:59:03 +00:00
If the < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > kRGB_565_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kRGB_565_SkColorType' > then< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a >
is ignored; RGB is treated as opaque. If < a href = '#SkBitmap_colorType' > colorType< / a > () < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > ,
2018-05-17 16:17:28 +00:00
then RGB is ignored.
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_erase_c' > < code > < strong > c< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > < a href = 'undocumented#Unpremultiply' > unpremultiplied< / a > < a href = 'SkColor_Reference#Color' > color< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_erase_area' > < code > < strong > area< / strong > < / code > < / a > < / td >
< td > rectangle to fill< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "2c5c4230ccd2861a5d15b7cd2764ab6e" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_eraseColor' > eraseColor< / a > < a href = '#SkBitmap_eraseARGB' > eraseARGB< / a > < a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_drawRect' > drawRect< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_eraseArea' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_eraseArea' > eraseArea< / a > (< a href = '#SkBitmap_eraseArea' > const< / a > < a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > & < a href = 'SkIRect_Reference#SkIRect' > area< / a > , < a href = 'SkColor_Reference#SkColor' > SkColor< / a > < a href = 'SkColor_Reference#SkColor' > c< / a > ) < a href = 'SkColor_Reference#SkColor' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-05-16 11:07:07 +00:00
Deprecated.
< a name = 'SkBitmap_getColor' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
< a href = 'SkColor_Reference#SkColor' > SkColor< / a > < a href = '#SkBitmap_getColor' > getColor< / a > (< a href = '#SkBitmap_getColor' > int< / a > < a href = '#SkBitmap_getColor' > x< / a > , < a href = '#SkBitmap_getColor' > int< / a > < a href = '#SkBitmap_getColor' > y< / a > ) < a href = '#SkBitmap_getColor' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > at< / a > (< a href = '#SkBitmap_getColor_x' > x< / a > , < a href = '#SkBitmap_getColor_y' > y< / a > ) < a href = '#SkBitmap_getColor_y' > as< / a > < a href = 'undocumented#Unpremultiply' > unpremultiplied< / a > < a href = 'SkColor_Reference#Color' > color< / a > .
Returns black with < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > if< / a > < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > is< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Input is not validated: out of bounds values of < a href = '#SkBitmap_getColor_x' > x< / a > < a href = '#SkBitmap_getColor_x' > or< / a > < a href = '#SkBitmap_getColor_y' > y< / a > < a href = '#SkBitmap_getColor_y' > trigger< / a > < a href = '#SkBitmap_getColor_y' > an< / a > < a href = '#SkBitmap_getColor_y' > assert()< / a > < a href = '#SkBitmap_getColor_y' > if< / a >
2018-01-04 21:11:51 +00:00
built with SK_DEBUG defined; and returns undefined values or may crash if
2018-11-07 19:59:03 +00:00
SK_RELEASE is defined. Fails if < a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > or< / a >
< a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > nullptr< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#SkColorSpace' > SkColorSpace< / a > < a href = 'undocumented#SkColorSpace' > in< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > is< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > ignored< / a > . < a href = 'SkImageInfo_Reference#SkImageInfo' > Some< / a > < a href = 'SkColor_Reference#Color' > color< / a > < a href = 'SkColor_Reference#Color' > precision< / a > < a href = 'SkColor_Reference#Color' > may< / a > < a href = 'SkColor_Reference#Color' > be< / a > < a href = 'SkColor_Reference#Color' > lost< / a > < a href = 'SkColor_Reference#Color' > in< / a > < a href = 'SkColor_Reference#Color' > the< / a >
conversion to < a href = 'undocumented#Unpremultiply' > unpremultiplied< / a > < a href = 'SkColor_Reference#Color' > color< / a > ; < a href = 'SkColor_Reference#Color' > original< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Data' > data< / a > < a href = 'undocumented#Data' > may< / a > < a href = 'undocumented#Data' > have< / a > < a href = 'undocumented#Data' > additional< / a >
2017-10-04 18:31:33 +00:00
precision.
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_getColor_x' > < code > < strong > x< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > column index, zero or greater, and less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_getColor_y' > < code > < strong > y< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > row index, zero or greater, and less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > converted< / a > < a href = 'undocumented#Pixel' > to< / a > < a href = 'undocumented#Unpremultiply' > unpremultiplied< / a > < a href = 'SkColor_Reference#Color' > color< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-05 05:35:27 +00:00
< div > < fiddle-embed name = "193d1f6d8a43b7a8e9f27ba21de38617" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
Premultiplied:
(0, 0) 0x00000000 0x2a0e002a 0x55380055 0x7f7f007f
(0, 1) 0x2a000e2a 0x551c1c55 0x7f542a7f 0xaaaa38aa
(0, 2) 0x55003855 0x7f2a547f 0xaa7171aa 0xd4d48dd4
(0, 3) 0x7f007f7f 0xaa38aaaa 0xd48dd4d4 0xffffffff
Unpremultiplied:
(0, 0) 0x00000000 0x2a5500ff 0x55a800ff 0x7fff00ff
(0, 1) 0x2a0055ff 0x555454ff 0x7fa954ff 0xaaff54ff
(0, 2) 0x5500a8ff 0x7f54a9ff 0xaaaaaaff 0xd4ffaaff
(0, 3) 0x7f00ffff 0xaa54ffff 0xd4aaffff 0xffffffff
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getAlphaf' > getAlphaf< / a > < a href = '#SkBitmap_getAddr' > getAddr< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a >
2018-09-20 21:31:43 +00:00
< a name = 'SkBitmap_getAlphaf' > < / a >
2018-10-16 14:30:28 +00:00
---
2018-09-20 21:31:43 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
float < a href = '#SkBitmap_getAlphaf' > getAlphaf< / a > (< a href = '#SkBitmap_getAlphaf' > int< / a > < a href = '#SkBitmap_getAlphaf' > x< / a > , < a href = '#SkBitmap_getAlphaf' > int< / a > < a href = '#SkBitmap_getAlphaf' > y< / a > ) < a href = '#SkBitmap_getAlphaf' > const< / a >
2018-09-20 21:31:43 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Looks up the < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > at< / a > (< a href = '#SkBitmap_getAlphaf_x' > x< / a > ,< a href = '#SkBitmap_getAlphaf_y' > y< / a > ) < a href = '#SkBitmap_getAlphaf_y' > and< / a > < a href = '#SkBitmap_getAlphaf_y' > return< / a > < a href = '#SkBitmap_getAlphaf_y' > its< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > component< / a > , < a href = 'SkColor_Reference#Alpha' > normalized< / a > < a href = 'SkColor_Reference#Alpha' > to< / a > [0..1].
< a href = 'SkColor_Reference#Alpha' > This< / a > < a href = 'SkColor_Reference#Alpha' > is< / a > < a href = 'SkColor_Reference#Alpha' > roughly< / a > < a href = 'SkColor_Reference#Alpha' > equivalent< / a > < a href = 'SkColor_Reference#Alpha' > to< / a > < code > SkGetColorA(< a href = '#SkBitmap_getColor' > getColor< / a > ())< / code > , but can be more efficient
2018-09-20 21:31:43 +00:00
(and more precise if the pixels store more than 8 bits per component).
### Parameters
< table > < tr > < td > < a name = 'SkBitmap_getAlphaf_x' > < code > < strong > x< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > column index, zero or greater, and less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-09-20 21:31:43 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_getAlphaf_y' > < code > < strong > y< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > row index, zero or greater, and less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2018-09-20 21:31:43 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
< a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > converted< / a > < a href = 'SkColor_Reference#Alpha' > to< / a > < a href = 'SkColor_Reference#Alpha' > normalized< / a > < a href = 'SkColor_Reference#Alpha' > float< / a >
2018-09-20 21:31:43 +00:00
### See Also
< a href = '#SkBitmap_getColor' > getColor< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getAddr' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void* < a href = '#SkBitmap_getAddr' > getAddr< / a > (< a href = '#SkBitmap_getAddr' > int< / a > < a href = '#SkBitmap_getAddr' > x< / a > , < a href = '#SkBitmap_getAddr' > int< / a > < a href = '#SkBitmap_getAddr' > y< / a > ) < a href = '#SkBitmap_getAddr' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Returns < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a > < a href = 'undocumented#Pixel' > at< / a > (< a href = '#SkBitmap_getAddr_x' > x< / a > , < a href = '#SkBitmap_getAddr_y' > y< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Input is not validated: out of bounds values of < a href = '#SkBitmap_getAddr_x' > x< / a > < a href = '#SkBitmap_getAddr_x' > or< / a > < a href = '#SkBitmap_getAddr_y' > y< / a > , < a href = '#SkBitmap_getAddr_y' > or< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > ,
2018-01-04 21:11:51 +00:00
trigger an assert() if built with SK_DEBUG defined. Returns nullptr if
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#SkColorType' > SkColorType< / a > < a href = 'SkImageInfo_Reference#SkColorType' > is< / a > < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > kUnknown_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kUnknown_SkColorType' > or< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > is< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Performs a lookup of < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Size' > size< / a > ; < a href = 'undocumented#Size' > for< / a > < a href = 'undocumented#Size' > better< / a > < a href = 'undocumented#Size' > performance< / a > , < a href = 'undocumented#Size' > call< / a >
one of: < a href = '#SkBitmap_getAddr8' > getAddr8< / a > (), < a href = '#SkBitmap_getAddr16' > getAddr16< / a > (), < a href = '#SkBitmap_getAddr16' > or< / a > < a href = '#SkBitmap_getAddr32' > getAddr32< / a > ().
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_getAddr_x' > < code > < strong > x< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > column index, zero or greater, and less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_getAddr_y' > < code > < strong > y< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > row index, zero or greater, and less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-10-31 16:14:03 +00:00
generic pointer to < a href = 'undocumented#Pixel' > pixel< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-03-16 15:34:15 +00:00
< div > < fiddle-embed name = "ffcefb2344cd38c3b99f69cfe6d64a17" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
addr interval == rowBytes
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getAddr8' > getAddr8< / a > < a href = '#SkBitmap_getAddr16' > getAddr16< / a > < a href = '#SkBitmap_getAddr32' > getAddr32< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > ::< a href = '#SkPixmap_addr' > addr< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getAddr32' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
uint32_t* < a href = '#SkBitmap_getAddr32' > getAddr32< / a > (< a href = '#SkBitmap_getAddr32' > int< / a > < a href = '#SkBitmap_getAddr32' > x< / a > , < a href = '#SkBitmap_getAddr32' > int< / a > < a href = '#SkBitmap_getAddr32' > y< / a > ) < a href = '#SkBitmap_getAddr32' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-05-16 11:07:07 +00:00
Returns address at (< a href = '#SkBitmap_getAddr32_x' > x< / a > , < a href = '#SkBitmap_getAddr32_y' > y< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getAddr32_y' > Input< / a > < a href = '#SkBitmap_getAddr32_y' > is< / a > < a href = '#SkBitmap_getAddr32_y' > not< / a > < a href = '#SkBitmap_getAddr32_y' > validated< / a > . < a href = '#SkBitmap_getAddr32_y' > Triggers< / a > < a href = '#SkBitmap_getAddr32_y' > an< / a > < a href = '#SkBitmap_getAddr32_y' > assert()< / a > < a href = '#SkBitmap_getAddr32_y' > if< / a > < a href = '#SkBitmap_getAddr32_y' > built< / a > < a href = '#SkBitmap_getAddr32_y' > with< / a > < a href = '#SkBitmap_getAddr32_y' > SK_DEBUG< / a > < a href = '#SkBitmap_getAddr32_y' > defined< / a > < a href = '#SkBitmap_getAddr32_y' > and< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_bytesPerPixel' > bytesPerPixel< / a > () < a href = '#SkBitmap_bytesPerPixel' > is< / a > < a href = '#SkBitmap_bytesPerPixel' > not< / a > < a href = '#SkBitmap_bytesPerPixel' > four< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_getAddr32_x' > x< / a > < a href = '#SkBitmap_getAddr32_x' > is< / a > < a href = '#SkBitmap_getAddr32_x' > negative< / a > , < a href = '#SkBitmap_getAddr32_x' > or< / a > < a href = '#SkBitmap_getAddr32_x' > not< / a > < a href = '#SkBitmap_getAddr32_x' > less< / a > < a href = '#SkBitmap_getAddr32_x' > than< / a > < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_getAddr32_y' > y< / a > < a href = '#SkBitmap_getAddr32_y' > is< / a > < a href = '#SkBitmap_getAddr32_y' > negative< / a > , < a href = '#SkBitmap_getAddr32_y' > or< / a > < a href = '#SkBitmap_getAddr32_y' > not< / a > < a href = '#SkBitmap_getAddr32_y' > less< / a > < a href = '#SkBitmap_getAddr32_y' > than< / a > < a href = '#SkBitmap_height' > height()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_getAddr32_x' > < code > < strong > x< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > column index, zero or greater, and less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_getAddr32_y' > < code > < strong > y< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > row index, zero or greater, and less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
unsigned 32-bit pointer to < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > at< / a > (< a href = '#SkBitmap_getAddr32_x' > x< / a > , < a href = '#SkBitmap_getAddr32_y' > y< / a > )
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "837a2bcc9fb9ce617a3420956cefc64a" >
#### Example Output
~~~~
addr interval == rowBytes
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getAddr8' > getAddr8< / a > < a href = '#SkBitmap_getAddr16' > getAddr16< / a > < a href = '#SkBitmap_getAddr' > getAddr< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > ::< a href = '#SkPixmap_addr32' > addr32< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getAddr16' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
uint16_t* < a href = '#SkBitmap_getAddr16' > getAddr16< / a > (< a href = '#SkBitmap_getAddr16' > int< / a > < a href = '#SkBitmap_getAddr16' > x< / a > , < a href = '#SkBitmap_getAddr16' > int< / a > < a href = '#SkBitmap_getAddr16' > y< / a > ) < a href = '#SkBitmap_getAddr16' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-05-16 11:07:07 +00:00
Returns address at (< a href = '#SkBitmap_getAddr16_x' > x< / a > , < a href = '#SkBitmap_getAddr16_y' > y< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getAddr16_y' > Input< / a > < a href = '#SkBitmap_getAddr16_y' > is< / a > < a href = '#SkBitmap_getAddr16_y' > not< / a > < a href = '#SkBitmap_getAddr16_y' > validated< / a > . < a href = '#SkBitmap_getAddr16_y' > Triggers< / a > < a href = '#SkBitmap_getAddr16_y' > an< / a > < a href = '#SkBitmap_getAddr16_y' > assert()< / a > < a href = '#SkBitmap_getAddr16_y' > if< / a > < a href = '#SkBitmap_getAddr16_y' > built< / a > < a href = '#SkBitmap_getAddr16_y' > with< / a > < a href = '#SkBitmap_getAddr16_y' > SK_DEBUG< / a > < a href = '#SkBitmap_getAddr16_y' > defined< / a > < a href = '#SkBitmap_getAddr16_y' > and< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_bytesPerPixel' > bytesPerPixel< / a > () < a href = '#SkBitmap_bytesPerPixel' > is< / a > < a href = '#SkBitmap_bytesPerPixel' > not< / a > < a href = '#SkBitmap_bytesPerPixel' > two< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_getAddr16_x' > x< / a > < a href = '#SkBitmap_getAddr16_x' > is< / a > < a href = '#SkBitmap_getAddr16_x' > negative< / a > , < a href = '#SkBitmap_getAddr16_x' > or< / a > < a href = '#SkBitmap_getAddr16_x' > not< / a > < a href = '#SkBitmap_getAddr16_x' > less< / a > < a href = '#SkBitmap_getAddr16_x' > than< / a > < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_getAddr16_y' > y< / a > < a href = '#SkBitmap_getAddr16_y' > is< / a > < a href = '#SkBitmap_getAddr16_y' > negative< / a > , < a href = '#SkBitmap_getAddr16_y' > or< / a > < a href = '#SkBitmap_getAddr16_y' > not< / a > < a href = '#SkBitmap_getAddr16_y' > less< / a > < a href = '#SkBitmap_getAddr16_y' > than< / a > < a href = '#SkBitmap_height' > height()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_getAddr16_x' > < code > < strong > x< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > column index, zero or greater, and less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_getAddr16_y' > < code > < strong > y< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > row index, zero or greater, and less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
unsigned 16-bit pointer to < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > at< / a > (< a href = '#SkBitmap_getAddr16_x' > x< / a > , < a href = '#SkBitmap_getAddr16_y' > y< / a > )
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "53e00899ef2e00e2096daf7a07d9b059" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
addr interval == rowBytes
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getAddr8' > getAddr8< / a > < a href = '#SkBitmap_getAddr' > getAddr< / a > < a href = '#SkBitmap_getAddr32' > getAddr32< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > ::< a href = '#SkPixmap_addr16' > addr16< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_getAddr8' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
uint8_t* < a href = '#SkBitmap_getAddr8' > getAddr8< / a > (< a href = '#SkBitmap_getAddr8' > int< / a > < a href = '#SkBitmap_getAddr8' > x< / a > , < a href = '#SkBitmap_getAddr8' > int< / a > < a href = '#SkBitmap_getAddr8' > y< / a > ) < a href = '#SkBitmap_getAddr8' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-05-16 11:07:07 +00:00
Returns address at (< a href = '#SkBitmap_getAddr8_x' > x< / a > , < a href = '#SkBitmap_getAddr8_y' > y< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getAddr8_y' > Input< / a > < a href = '#SkBitmap_getAddr8_y' > is< / a > < a href = '#SkBitmap_getAddr8_y' > not< / a > < a href = '#SkBitmap_getAddr8_y' > validated< / a > . < a href = '#SkBitmap_getAddr8_y' > Triggers< / a > < a href = '#SkBitmap_getAddr8_y' > an< / a > < a href = '#SkBitmap_getAddr8_y' > assert()< / a > < a href = '#SkBitmap_getAddr8_y' > if< / a > < a href = '#SkBitmap_getAddr8_y' > built< / a > < a href = '#SkBitmap_getAddr8_y' > with< / a > < a href = '#SkBitmap_getAddr8_y' > SK_DEBUG< / a > < a href = '#SkBitmap_getAddr8_y' > defined< / a > < a href = '#SkBitmap_getAddr8_y' > and< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_bytesPerPixel' > bytesPerPixel< / a > () < a href = '#SkBitmap_bytesPerPixel' > is< / a > < a href = '#SkBitmap_bytesPerPixel' > not< / a > < a href = '#SkBitmap_bytesPerPixel' > one< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_getAddr8_x' > x< / a > < a href = '#SkBitmap_getAddr8_x' > is< / a > < a href = '#SkBitmap_getAddr8_x' > negative< / a > , < a href = '#SkBitmap_getAddr8_x' > or< / a > < a href = '#SkBitmap_getAddr8_x' > not< / a > < a href = '#SkBitmap_getAddr8_x' > less< / a > < a href = '#SkBitmap_getAddr8_x' > than< / a > < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_getAddr8_y' > y< / a > < a href = '#SkBitmap_getAddr8_y' > is< / a > < a href = '#SkBitmap_getAddr8_y' > negative< / a > , < a href = '#SkBitmap_getAddr8_y' > or< / a > < a href = '#SkBitmap_getAddr8_y' > not< / a > < a href = '#SkBitmap_getAddr8_y' > less< / a > < a href = '#SkBitmap_getAddr8_y' > than< / a > < a href = '#SkBitmap_height' > height()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_getAddr8_x' > < code > < strong > x< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > column index, zero or greater, and less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_getAddr8_y' > < code > < strong > y< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > row index, zero or greater, and less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
unsigned 8-bit pointer to < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > at< / a > (< a href = '#SkBitmap_getAddr8_x' > x< / a > , < a href = '#SkBitmap_getAddr8_y' > y< / a > )
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "cb9a08e8ff779b6a1cf8bb54f3883aaf" >
#### Example Output
~~~~
& pixels[4][2] == bitmap.getAddr8(2, 4)
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_getAddr' > getAddr< / a > < a href = '#SkBitmap_getAddr16' > getAddr16< / a > < a href = '#SkBitmap_getAddr32' > getAddr32< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > ::< a href = '#SkPixmap_addr8' > addr8< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_extractSubset' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_extractSubset' > extractSubset< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#SkBitmap' > dst< / a > , < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkIRect_Reference#SkIRect' > SkIRect< / a > & < a href = 'SkIRect_Reference#SkIRect' > subset< / a > ) < a href = 'SkIRect_Reference#SkIRect' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Shares < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > with< / a > < a href = '#SkBitmap_extractSubset_dst' > dst< / a > . < a href = '#SkBitmap_extractSubset_dst' > Pixels< / a > < a href = '#SkBitmap_extractSubset_dst' > are< / a > < a href = '#SkBitmap_extractSubset_dst' > not< / a > < a href = '#SkBitmap_extractSubset_dst' > copied< / a > ; < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > and< / a > < a href = '#SkBitmap_extractSubset_dst' > dst< / a > < a href = 'SkPoint_Reference#Point' > point< / a >
< a href = 'SkPoint_Reference#Point' > to< / a > < a href = 'SkPoint_Reference#Point' > the< / a > < a href = 'SkPoint_Reference#Point' > same< / a > < a href = 'SkPoint_Reference#Point' > pixels< / a > ; < a href = '#SkBitmap_extractSubset_dst' > dst< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > < a href = '#SkBitmap_bounds' > are< / a > < a href = '#SkBitmap_bounds' > set< / a > < a href = '#SkBitmap_bounds' > to< / a > < a href = '#SkBitmap_bounds' > the< / a > < a href = '#SkBitmap_bounds' > intersection< / a > < a href = '#SkBitmap_bounds' > of< / a > < a href = '#SkBitmap_extractSubset_subset' > subset< / a >
< a href = '#SkBitmap_extractSubset_subset' > and< / a > < a href = '#SkBitmap_extractSubset_subset' > the< / a > < a href = '#SkBitmap_extractSubset_subset' > original< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_extractSubset_subset' > subset< / a > < a href = '#SkBitmap_extractSubset_subset' > may< / a > < a href = '#SkBitmap_extractSubset_subset' > be< / a > < a href = '#SkBitmap_extractSubset_subset' > larger< / a > < a href = '#SkBitmap_extractSubset_subset' > than< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > . < a href = '#SkBitmap_bounds' > Any< / a > < a href = '#SkBitmap_bounds' > area< / a > < a href = '#SkBitmap_bounds' > outside< / a > < a href = '#SkBitmap_bounds' > of< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > < a href = '#SkBitmap_bounds' > is< / a > < a href = '#SkBitmap_bounds' > ignored< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_bounds' > Any< / a > < a href = '#SkBitmap_bounds' > contents< / a > < a href = '#SkBitmap_bounds' > of< / a > < a href = '#SkBitmap_extractSubset_dst' > dst< / a > < a href = '#SkBitmap_extractSubset_dst' > are< / a > < a href = '#SkBitmap_extractSubset_dst' > discarded< / a > . < a href = '#SkBitmap_isVolatile' > isVolatile< / a > < a href = '#SkBitmap_isVolatile' > setting< / a > < a href = '#SkBitmap_isVolatile' > is< / a > < a href = '#SkBitmap_isVolatile' > copied< / a > < a href = '#SkBitmap_isVolatile' > to< / a > < a href = '#SkBitmap_extractSubset_dst' > dst< / a > .
< a href = '#SkBitmap_extractSubset_dst' > dst< / a > < a href = '#SkBitmap_extractSubset_dst' > is< / a > < a href = '#SkBitmap_extractSubset_dst' > set< / a > < a href = '#SkBitmap_extractSubset_dst' > to< / a > < a href = '#SkBitmap_colorType' > colorType< / a > , < a href = '#SkBitmap_alphaType' > alphaType< / a > , < a href = '#SkBitmap_alphaType' > and< / a > < a href = '#SkBitmap_colorSpace' > colorSpace< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_colorSpace' > Return< / a > < a href = '#SkBitmap_colorSpace' > false< / a > < a href = '#SkBitmap_colorSpace' > if< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_extractSubset_dst' > dst< / a > < a href = '#SkBitmap_extractSubset_dst' > is< / a > < a href = '#SkBitmap_extractSubset_dst' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_extractSubset_subset' > subset< / a > < a href = '#SkBitmap_extractSubset_subset' > does< / a > < a href = '#SkBitmap_extractSubset_subset' > not< / a > < a href = '#SkBitmap_extractSubset_subset' > intersect< / a > < a href = '#SkBitmap_bounds' > bounds()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_extractSubset_dst' > < code > < strong > dst< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > set< / a > < a href = 'SkBitmap_Reference#Bitmap' > to< / a > < a href = '#SkBitmap_extractSubset_subset' > subset< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_extractSubset_subset' > < code > < strong > subset< / strong > < / code > < / a > < / td >
< td > rectangle of pixels to reference< / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = '#SkBitmap_extractSubset_dst' > dst< / a > < a href = '#SkBitmap_extractSubset_dst' > is< / a > < a href = '#SkBitmap_extractSubset_dst' > replaced< / a > < a href = '#SkBitmap_extractSubset_dst' > by< / a > < a href = '#SkBitmap_extractSubset_subset' > subset< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-18 20:21:51 +00:00
< div > < fiddle-embed name = "304148c50c91490bfd58e9222342419c" >
2017-10-04 18:31:33 +00:00
#### Example Output
~~~~
bounds: 0, 0, 512, 512
subset: -100, 100, 0, 200 success; false
subset: -100, 100, 100, 200 success; true subset: 0, 0, 100, 100
subset: -100, 100, 1000, 200 success; true subset: 0, 0, 512, 100
subset: 0, 100, 0, 200 success; false
subset: 0, 100, 100, 200 success; true subset: 0, 0, 100, 100
subset: 0, 100, 1000, 200 success; true subset: 0, 0, 512, 100
subset: 100, 100, 0, 200 success; false
subset: 100, 100, 100, 200 success; false
subset: 100, 100, 1000, 200 success; true subset: 0, 0, 412, 100
subset: 1000, 100, 0, 200 success; false
subset: 1000, 100, 100, 200 success; false
subset: 1000, 100, 1000, 200 success; false
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_readPixels' > readPixels< / a > < a href = '#SkBitmap_writePixels' > writePixels< / a > < a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_drawBitmap' > drawBitmap< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_readPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_readPixels' > readPixels< / a > (< a href = '#SkBitmap_readPixels' > const< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > & < a href = 'SkImageInfo_Reference#SkImageInfo' > dstInfo< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > void< / a > * < a href = 'SkImageInfo_Reference#SkImageInfo' > dstPixels< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > size_t< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > dstRowBytes< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > int< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > srcX< / a > , < a href = 'SkImageInfo_Reference#SkImageInfo' > int< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > srcY< / a > ) < a href = 'SkImageInfo_Reference#SkImageInfo' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies a < a href = 'SkRect_Reference#Rect' > Rect< / a > < a href = 'SkRect_Reference#Rect' > of< / a > < a href = 'SkRect_Reference#Rect' > pixels< / a > < a href = 'SkRect_Reference#Rect' > from< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > to< / a > < a href = '#SkBitmap_readPixels_dstPixels' > dstPixels< / a > . < a href = '#SkBitmap_readPixels_dstPixels' > Copy< / a > < a href = '#SkBitmap_readPixels_dstPixels' > starts< / a > < a href = '#SkBitmap_readPixels_dstPixels' > at< / a > (< a href = '#SkBitmap_readPixels_srcX' > srcX< / a > , < a href = '#SkBitmap_readPixels_srcY' > srcY< / a > ),
< a href = '#SkBitmap_readPixels_srcY' > and< / a > < a href = '#SkBitmap_readPixels_srcY' > does< / a > < a href = '#SkBitmap_readPixels_srcY' > not< / a > < a href = '#SkBitmap_readPixels_srcY' > exceed< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > (< a href = '#SkBitmap_width' > width()< / a > , < a href = '#SkBitmap_height' > height()< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_readPixels_dstInfo' > dstInfo< / a > < a href = '#SkBitmap_readPixels_dstInfo' > specifies< / a > < a href = '#SkBitmap_readPixels_dstInfo' > width< / a > , < a href = '#SkBitmap_readPixels_dstInfo' > height< / a > , < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Image_Info_Alpha_Type' > and< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > of< / a >
< a href = '#Color_Space' > destination< / a > . < a href = '#SkBitmap_readPixels_dstRowBytes' > dstRowBytes< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > specifics< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > the< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > gap< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > from< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > one< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > destination< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > row< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > to< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > the< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > next< / a > .
< a href = '#SkBitmap_readPixels_dstRowBytes' > Returns< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > true< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > if< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > pixels< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > are< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > copied< / a > . < a href = '#SkBitmap_readPixels_dstRowBytes' > Returns< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > false< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > if< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_readPixels_dstInfo' > dstInfo< / a > < a href = '#SkBitmap_readPixels_dstInfo' > has< / a > < a href = '#SkBitmap_readPixels_dstInfo' > no< / a > < a href = '#SkBitmap_readPixels_dstInfo' > address< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_readPixels_dstRowBytes' > dstRowBytes< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > is< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > less< / a > < a href = '#SkBitmap_readPixels_dstRowBytes' > than< / a > < a href = '#SkBitmap_readPixels_dstInfo' > dstInfo< / a > .< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > ()< / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
2018-11-07 19:59:03 +00:00
Pixels are copied only if < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > possible< / a > . < a href = 'undocumented#Pixel' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a >
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > ; < a href = '#SkBitmap_readPixels_dstInfo' > dstInfo< / a > .< a href = '#SkImageInfo_colorType' > colorType< / a > () < a href = '#SkImageInfo_colorType' > must< / a > < a href = '#SkImageInfo_colorType' > match< / a > .
< a href = '#SkImageInfo_colorType' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = '#SkBitmap_readPixels_dstInfo' > dstInfo< / a > .< a href = '#SkImageInfo_colorSpace' > colorSpace< / a > () < a href = '#SkImageInfo_colorSpace' > must< / a > < a href = '#SkImageInfo_colorSpace' > match< / a > .
< a href = '#SkImageInfo_colorSpace' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > < a href = '#SkBitmap_alphaType' > is< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > , < a href = '#SkBitmap_readPixels_dstInfo' > dstInfo< / a > .< a href = '#SkImageInfo_alphaType' > alphaType< / a > () < a href = '#SkImageInfo_alphaType' > must< / a >
< a href = '#SkImageInfo_alphaType' > match< / a > . < a href = '#SkImageInfo_alphaType' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorSpace' > colorSpace< / a > < a href = '#SkBitmap_colorSpace' > is< / a > < a href = '#SkBitmap_colorSpace' > nullptr< / a > , < a href = '#SkBitmap_readPixels_dstInfo' > dstInfo< / a > .< a href = '#SkImageInfo_colorSpace' > colorSpace< / a > () < a href = '#SkImageInfo_colorSpace' > must< / a > < a href = '#SkImageInfo_colorSpace' > match< / a > . < a href = '#SkImageInfo_colorSpace' > Returns< / a >
< a href = '#SkImageInfo_colorSpace' > false< / a > < a href = '#SkImageInfo_colorSpace' > if< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > not< / a > < a href = 'undocumented#Pixel' > possible< / a > .
2018-05-16 11:07:07 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_readPixels_srcX' > srcX< / a > < a href = '#SkBitmap_readPixels_srcX' > and< / a > < a href = '#SkBitmap_readPixels_srcY' > srcY< / a > < a href = '#SkBitmap_readPixels_srcY' > may< / a > < a href = '#SkBitmap_readPixels_srcY' > be< / a > < a href = '#SkBitmap_readPixels_srcY' > negative< / a > < a href = '#SkBitmap_readPixels_srcY' > to< / a > < a href = '#SkBitmap_readPixels_srcY' > copy< / a > < a href = '#SkBitmap_readPixels_srcY' > only< / a > < a href = '#SkBitmap_readPixels_srcY' > top< / a > < a href = '#SkBitmap_readPixels_srcY' > or< / a > < a href = '#SkBitmap_readPixels_srcY' > left< / a > < a href = '#SkBitmap_readPixels_srcY' > of< / a > < a href = '#SkBitmap_readPixels_srcY' > source< / a > . < a href = '#SkBitmap_readPixels_srcY' > Returns< / a >
< a href = '#SkBitmap_readPixels_srcY' > false< / a > < a href = '#SkBitmap_readPixels_srcY' > if< / a > < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > or< / a > < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > is< / a > < a href = '#SkBitmap_height' > zero< / a > < a href = '#SkBitmap_height' > or< / a > < a href = '#SkBitmap_height' > negative< / a > .
< a href = '#SkBitmap_height' > Returns< / a > < a href = '#SkBitmap_height' > false< / a > < a href = '#SkBitmap_height' > if< / a > < code > < a href = 'undocumented#abs()' > abs< / a > (< a href = '#SkBitmap_readPixels_srcX' > srcX< / a > ) >= < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_width' > width()< / a > < / code > , or if < code > < a href = 'undocumented#abs()' > abs< / a > (< a href = '#SkBitmap_readPixels_srcY' > srcY< / a > ) >= < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_height' > height()< / a > < / code > .
2018-05-16 11:07:07 +00:00
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_readPixels_dstInfo' > < code > < strong > dstInfo< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > destination width, height, < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Color_Space' > Color_Space< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_readPixels_dstPixels' > < code > < strong > dstPixels< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > destination < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_readPixels_dstRowBytes' > < code > < strong > dstRowBytes< / strong > < / code > < / a > < / td >
< td > destination row length< / td >
< / tr >
< tr > < td > < a name = 'SkBitmap_readPixels_srcX' > < code > < strong > srcX< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > column index whose absolute value is less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_readPixels_srcY' > < code > < strong > srcY< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > row index whose absolute value is less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
### Return Value
2018-05-16 11:07:07 +00:00
true if pixels are copied to < a href = '#SkBitmap_readPixels_dstPixels' > dstPixels< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-17 17:19:56 +00:00
< div > < fiddle-embed name = "b2cbbbbcffb618865d8aae3bc04b2a62" > < div > Transferring the gradient from 8 bits per component to 4 bits per component
creates visible banding.
< / div > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_writePixels' > writePixels< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > ::< a href = '#SkPixmap_readPixels' > readPixels< / a > < a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_readPixels' > readPixels< / a > < a href = 'SkImage_Reference#SkImage' > SkImage< / a > ::< a href = '#SkImage_readPixels' > readPixels< / a > < a href = 'SkSurface_Reference#SkSurface' > SkSurface< / a > ::< a href = '#SkSurface_readPixels' > readPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_readPixels_2' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_readPixels' > readPixels< / a > (< a href = '#SkBitmap_readPixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#SkPixmap' > dst< / a > , < a href = 'SkPixmap_Reference#SkPixmap' > int< / a > < a href = 'SkPixmap_Reference#SkPixmap' > srcX< / a > , < a href = 'SkPixmap_Reference#SkPixmap' > int< / a > < a href = 'SkPixmap_Reference#SkPixmap' > srcY< / a > ) < a href = 'SkPixmap_Reference#SkPixmap' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies a < a href = 'SkRect_Reference#Rect' > Rect< / a > < a href = 'SkRect_Reference#Rect' > of< / a > < a href = 'SkRect_Reference#Rect' > pixels< / a > < a href = 'SkRect_Reference#Rect' > from< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > to< / a > < a href = '#SkBitmap_readPixels_2_dst' > dst< / a > . < a href = '#SkBitmap_readPixels_2_dst' > Copy< / a > < a href = '#SkBitmap_readPixels_2_dst' > starts< / a > < a href = '#SkBitmap_readPixels_2_dst' > at< / a > (< a href = '#SkBitmap_readPixels_2_srcX' > srcX< / a > , < a href = '#SkBitmap_readPixels_2_srcY' > srcY< / a > ), < a href = '#SkBitmap_readPixels_2_srcY' > and< / a >
< a href = '#SkBitmap_readPixels_2_srcY' > does< / a > < a href = '#SkBitmap_readPixels_2_srcY' > not< / a > < a href = '#SkBitmap_readPixels_2_srcY' > exceed< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > (< a href = '#SkBitmap_width' > width()< / a > , < a href = '#SkBitmap_height' > height()< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_readPixels_2_dst' > dst< / a > < a href = '#SkBitmap_readPixels_2_dst' > specifies< / a > < a href = '#SkBitmap_readPixels_2_dst' > width< / a > , < a href = '#SkBitmap_readPixels_2_dst' > height< / a > , < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Color_Space' > Color_Space< / a > , < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > ,
< a href = 'undocumented#Pixel' > and< / a > < a href = '#Row_Bytes' > row bytes< / a > < a href = 'undocumented#Pixel' > of< / a > < a href = 'undocumented#Pixel' > destination< / a > . < a href = '#SkBitmap_readPixels_2_dst' > dst< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > specifics< / a > < a href = '#SkPixmap_rowBytes' > the< / a > < a href = '#SkPixmap_rowBytes' > gap< / a > < a href = '#SkPixmap_rowBytes' > from< / a > < a href = '#SkPixmap_rowBytes' > one< / a > < a href = '#SkPixmap_rowBytes' > destination< / a >
< a href = '#SkPixmap_rowBytes' > row< / a > < a href = '#SkPixmap_rowBytes' > to< / a > < a href = '#SkPixmap_rowBytes' > the< / a > < a href = '#SkPixmap_rowBytes' > next< / a > . < a href = '#SkPixmap_rowBytes' > Returns< / a > < a href = '#SkPixmap_rowBytes' > true< / a > < a href = '#SkPixmap_rowBytes' > if< / a > < a href = '#SkPixmap_rowBytes' > pixels< / a > < a href = '#SkPixmap_rowBytes' > are< / a > < a href = '#SkPixmap_rowBytes' > copied< / a > . < a href = '#SkPixmap_rowBytes' > Returns< / a > < a href = '#SkPixmap_rowBytes' > false< / a > < a href = '#SkPixmap_rowBytes' > if< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_readPixels_2_dst' > dst< / a > < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > < a href = 'undocumented#Pixel' > equals< / a > < a href = 'undocumented#Pixel' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_readPixels_2_dst' > dst< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > is< / a > < a href = '#SkPixmap_rowBytes' > less< / a > < a href = '#SkPixmap_rowBytes' > than< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > ()< / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
2018-11-07 19:59:03 +00:00
Pixels are copied only if < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > possible< / a > . < a href = 'undocumented#Pixel' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a >
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > ; < a href = '#SkBitmap_readPixels_2_dst' > dst< / a > < a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = '#Image_Info_Color_Type' > must< / a > < a href = '#Image_Info_Color_Type' > match< / a > .
< a href = '#Image_Info_Color_Type' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = '#SkBitmap_readPixels_2_dst' > dst< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > must< / a > < a href = '#Color_Space' > match< / a > .
< a href = '#Color_Space' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > < a href = '#SkBitmap_alphaType' > is< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > , < a href = '#SkBitmap_readPixels_2_dst' > dst< / a > < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > < a href = '#Image_Info_Alpha_Type' > must< / a >
< a href = '#Image_Info_Alpha_Type' > match< / a > . < a href = '#Image_Info_Alpha_Type' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorSpace' > colorSpace< / a > < a href = '#SkBitmap_colorSpace' > is< / a > < a href = '#SkBitmap_colorSpace' > nullptr< / a > , < a href = '#SkBitmap_readPixels_2_dst' > dst< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > must< / a > < a href = '#Color_Space' > match< / a > . < a href = '#Color_Space' > Returns< / a >
< a href = '#Color_Space' > false< / a > < a href = '#Color_Space' > if< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > not< / a > < a href = 'undocumented#Pixel' > possible< / a > .
2018-05-16 11:07:07 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_readPixels_2_srcX' > srcX< / a > < a href = '#SkBitmap_readPixels_2_srcX' > and< / a > < a href = '#SkBitmap_readPixels_2_srcY' > srcY< / a > < a href = '#SkBitmap_readPixels_2_srcY' > may< / a > < a href = '#SkBitmap_readPixels_2_srcY' > be< / a > < a href = '#SkBitmap_readPixels_2_srcY' > negative< / a > < a href = '#SkBitmap_readPixels_2_srcY' > to< / a > < a href = '#SkBitmap_readPixels_2_srcY' > copy< / a > < a href = '#SkBitmap_readPixels_2_srcY' > only< / a > < a href = '#SkBitmap_readPixels_2_srcY' > top< / a > < a href = '#SkBitmap_readPixels_2_srcY' > or< / a > < a href = '#SkBitmap_readPixels_2_srcY' > left< / a > < a href = '#SkBitmap_readPixels_2_srcY' > of< / a > < a href = '#SkBitmap_readPixels_2_srcY' > source< / a > . < a href = '#SkBitmap_readPixels_2_srcY' > Returns< / a >
< a href = '#SkBitmap_readPixels_2_srcY' > false< / a > < a href = '#SkBitmap_readPixels_2_srcY' > if< / a > < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > or< / a > < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > is< / a > < a href = '#SkBitmap_height' > zero< / a > < a href = '#SkBitmap_height' > or< / a > < a href = '#SkBitmap_height' > negative< / a > .
< a href = '#SkBitmap_height' > Returns< / a > < a href = '#SkBitmap_height' > false< / a > < a href = '#SkBitmap_height' > if< / a > < code > < a href = 'undocumented#abs()' > abs< / a > (< a href = '#SkBitmap_readPixels_2_srcX' > srcX< / a > ) >= < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_width' > width()< / a > < / code > , or if < code > < a href = 'undocumented#abs()' > abs< / a > (< a href = '#SkBitmap_readPixels_2_srcY' > srcY< / a > ) >= < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_height' > height()< / a > < / code > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-07-17 17:19:56 +00:00
< table > < tr > < td > < a name = 'SkBitmap_readPixels_2_dst' > < code > < strong > dst< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > destination < a href = 'SkPixmap_Reference#Pixmap' > Pixmap< / a > : < a href = '#Image_Info' > Image_Info< / a > , < a href = '#Image_Info' > pixels< / a > , < a href = '#Row_Bytes' > row bytes< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_readPixels_2_srcX' > < code > < strong > srcX< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > column index whose absolute value is less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_readPixels_2_srcY' > < code > < strong > srcY< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > row index whose absolute value is less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-07-17 17:19:56 +00:00
true if pixels are copied to < a href = '#SkBitmap_readPixels_2_dst' > dst< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-17 17:19:56 +00:00
< div > < fiddle-embed name = "e9f70cbc9827097449a386ec7a8a8188" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_writePixels' > writePixels< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > ::< a href = '#SkPixmap_readPixels' > readPixels< / a > < a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_readPixels' > readPixels< / a > < a href = 'SkImage_Reference#SkImage' > SkImage< / a > ::< a href = '#SkImage_readPixels' > readPixels< / a > < a href = 'SkSurface_Reference#SkSurface' > SkSurface< / a > ::< a href = '#SkSurface_readPixels' > readPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_readPixels_3' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_readPixels' > readPixels< / a > (< a href = '#SkBitmap_readPixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#SkPixmap' > dst< / a > ) < a href = 'SkPixmap_Reference#SkPixmap' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies a < a href = 'SkRect_Reference#Rect' > Rect< / a > < a href = 'SkRect_Reference#Rect' > of< / a > < a href = 'SkRect_Reference#Rect' > pixels< / a > < a href = 'SkRect_Reference#Rect' > from< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = 'SkBitmap_Reference#Bitmap' > to< / a > < a href = '#SkBitmap_readPixels_3_dst' > dst< / a > . < a href = '#SkBitmap_readPixels_3_dst' > Copy< / a > < a href = '#SkBitmap_readPixels_3_dst' > starts< / a > < a href = '#SkBitmap_readPixels_3_dst' > at< / a > (0, 0), < a href = '#SkBitmap_readPixels_3_dst' > and< / a >
< a href = '#SkBitmap_readPixels_3_dst' > does< / a > < a href = '#SkBitmap_readPixels_3_dst' > not< / a > < a href = '#SkBitmap_readPixels_3_dst' > exceed< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > (< a href = '#SkBitmap_width' > width()< / a > , < a href = '#SkBitmap_height' > height()< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_readPixels_3_dst' > dst< / a > < a href = '#SkBitmap_readPixels_3_dst' > specifies< / a > < a href = '#SkBitmap_readPixels_3_dst' > width< / a > , < a href = '#SkBitmap_readPixels_3_dst' > height< / a > , < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Color_Space' > Color_Space< / a > , < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > ,
< a href = 'undocumented#Pixel' > and< / a > < a href = '#Row_Bytes' > row bytes< / a > < a href = 'undocumented#Pixel' > of< / a > < a href = 'undocumented#Pixel' > destination< / a > . < a href = '#SkBitmap_readPixels_3_dst' > dst< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > specifics< / a > < a href = '#SkPixmap_rowBytes' > the< / a > < a href = '#SkPixmap_rowBytes' > gap< / a > < a href = '#SkPixmap_rowBytes' > from< / a > < a href = '#SkPixmap_rowBytes' > one< / a > < a href = '#SkPixmap_rowBytes' > destination< / a >
< a href = '#SkPixmap_rowBytes' > row< / a > < a href = '#SkPixmap_rowBytes' > to< / a > < a href = '#SkPixmap_rowBytes' > the< / a > < a href = '#SkPixmap_rowBytes' > next< / a > . < a href = '#SkPixmap_rowBytes' > Returns< / a > < a href = '#SkPixmap_rowBytes' > true< / a > < a href = '#SkPixmap_rowBytes' > if< / a > < a href = '#SkPixmap_rowBytes' > pixels< / a > < a href = '#SkPixmap_rowBytes' > are< / a > < a href = '#SkPixmap_rowBytes' > copied< / a > . < a href = '#SkPixmap_rowBytes' > Returns< / a > < a href = '#SkPixmap_rowBytes' > false< / a > < a href = '#SkPixmap_rowBytes' > if< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_readPixels_3_dst' > dst< / a > < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > < a href = 'undocumented#Pixel' > equals< / a > < a href = 'undocumented#Pixel' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_readPixels_3_dst' > dst< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > is< / a > < a href = '#SkPixmap_rowBytes' > less< / a > < a href = '#SkPixmap_rowBytes' > than< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > ()< / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
2018-11-07 19:59:03 +00:00
Pixels are copied only if < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > possible< / a > . < a href = 'undocumented#Pixel' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a >
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > ; < a href = '#SkBitmap_readPixels_3_dst' > dst< / a > < a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = '#Image_Info_Color_Type' > must< / a > < a href = '#Image_Info_Color_Type' > match< / a > .
< a href = '#Image_Info_Color_Type' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = '#SkBitmap_readPixels_3_dst' > dst< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > must< / a > < a href = '#Color_Space' > match< / a > .
< a href = '#Color_Space' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > < a href = '#SkBitmap_alphaType' > is< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > , < a href = '#SkBitmap_readPixels_3_dst' > dst< / a > < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > < a href = '#Image_Info_Alpha_Type' > must< / a >
< a href = '#Image_Info_Alpha_Type' > match< / a > . < a href = '#Image_Info_Alpha_Type' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorSpace' > colorSpace< / a > < a href = '#SkBitmap_colorSpace' > is< / a > < a href = '#SkBitmap_colorSpace' > nullptr< / a > , < a href = '#SkBitmap_readPixels_3_dst' > dst< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > must< / a > < a href = '#Color_Space' > match< / a > . < a href = '#Color_Space' > Returns< / a >
< a href = '#Color_Space' > false< / a > < a href = '#Color_Space' > if< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > not< / a > < a href = 'undocumented#Pixel' > possible< / a > .
2018-05-16 11:07:07 +00:00
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_readPixels_3_dst' > < code > < strong > dst< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > destination < a href = 'SkPixmap_Reference#Pixmap' > Pixmap< / a > : < a href = '#Image_Info' > Image_Info< / a > , < a href = '#Image_Info' > pixels< / a > , < a href = '#Row_Bytes' > row bytes< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
### Return Value
2018-05-16 11:07:07 +00:00
true if pixels are copied to < a href = '#SkBitmap_readPixels_3_dst' > dst< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-05-16 11:07:07 +00:00
< div > < fiddle-embed name = "4590fbf052659d6e629fbfd827081ae5" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_writePixels' > writePixels< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > ::< a href = '#SkPixmap_readPixels' > readPixels< / a > < a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_readPixels' > readPixels< / a > < a href = 'SkImage_Reference#SkImage' > SkImage< / a > ::< a href = '#SkImage_readPixels' > readPixels< / a > < a href = 'SkSurface_Reference#SkSurface' > SkSurface< / a > ::< a href = '#SkSurface_readPixels' > readPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_writePixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_writePixels' > writePixels< / a > (< a href = '#SkBitmap_writePixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#SkPixmap' > src< / a > , < a href = 'SkPixmap_Reference#SkPixmap' > int< / a > < a href = 'SkPixmap_Reference#SkPixmap' > dstX< / a > , < a href = 'SkPixmap_Reference#SkPixmap' > int< / a > < a href = 'SkPixmap_Reference#SkPixmap' > dstY< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies a < a href = 'SkRect_Reference#Rect' > Rect< / a > < a href = 'SkRect_Reference#Rect' > of< / a > < a href = 'SkRect_Reference#Rect' > pixels< / a > < a href = 'SkRect_Reference#Rect' > from< / a > < a href = '#SkBitmap_writePixels_src' > src< / a > . < a href = '#SkBitmap_writePixels_src' > Copy< / a > < a href = '#SkBitmap_writePixels_src' > starts< / a > < a href = '#SkBitmap_writePixels_src' > at< / a > (< a href = '#SkBitmap_writePixels_dstX' > dstX< / a > , < a href = '#SkBitmap_writePixels_dstY' > dstY< / a > ), < a href = '#SkBitmap_writePixels_dstY' > and< / a > < a href = '#SkBitmap_writePixels_dstY' > does< / a > < a href = '#SkBitmap_writePixels_dstY' > not< / a > < a href = '#SkBitmap_writePixels_dstY' > exceed< / a >
(< a href = '#SkBitmap_writePixels_src' > src< / a > .< a href = '#SkPixmap_width' > width()< / a > , < a href = '#SkBitmap_writePixels_src' > src< / a > .< a href = '#SkPixmap_height' > height()< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_writePixels_src' > src< / a > < a href = '#SkBitmap_writePixels_src' > specifies< / a > < a href = '#SkBitmap_writePixels_src' > width< / a > , < a href = '#SkBitmap_writePixels_src' > height< / a > , < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Color_Space' > Color_Space< / a > , < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > ,
< a href = 'undocumented#Pixel' > and< / a > < a href = '#Row_Bytes' > row bytes< / a > < a href = 'undocumented#Pixel' > of< / a > < a href = 'undocumented#Pixel' > source< / a > . < a href = '#SkBitmap_writePixels_src' > src< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > specifics< / a > < a href = '#SkPixmap_rowBytes' > the< / a > < a href = '#SkPixmap_rowBytes' > gap< / a > < a href = '#SkPixmap_rowBytes' > from< / a > < a href = '#SkPixmap_rowBytes' > one< / a > < a href = '#SkPixmap_rowBytes' > source< / a >
< a href = '#SkPixmap_rowBytes' > row< / a > < a href = '#SkPixmap_rowBytes' > to< / a > < a href = '#SkPixmap_rowBytes' > the< / a > < a href = '#SkPixmap_rowBytes' > next< / a > . < a href = '#SkPixmap_rowBytes' > Returns< / a > < a href = '#SkPixmap_rowBytes' > true< / a > < a href = '#SkPixmap_rowBytes' > if< / a > < a href = '#SkPixmap_rowBytes' > pixels< / a > < a href = '#SkPixmap_rowBytes' > are< / a > < a href = '#SkPixmap_rowBytes' > copied< / a > . < a href = '#SkPixmap_rowBytes' > Returns< / a > < a href = '#SkPixmap_rowBytes' > false< / a > < a href = '#SkPixmap_rowBytes' > if< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_writePixels_src' > src< / a > < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > < a href = 'undocumented#Pixel' > equals< / a > < a href = 'undocumented#Pixel' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_writePixels_src' > src< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > is< / a > < a href = '#SkPixmap_rowBytes' > less< / a > < a href = '#SkPixmap_rowBytes' > than< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > ()< / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
2018-11-07 19:59:03 +00:00
Pixels are copied only if < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > possible< / a > . < a href = 'undocumented#Pixel' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a >
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > ; < a href = '#SkBitmap_writePixels_src' > src< / a > < a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = '#Image_Info_Color_Type' > must< / a > < a href = '#Image_Info_Color_Type' > match< / a > .
< a href = '#Image_Info_Color_Type' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = '#SkBitmap_writePixels_src' > src< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > must< / a > < a href = '#Color_Space' > match< / a > .
< a href = '#Color_Space' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > < a href = '#SkBitmap_alphaType' > is< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > , < a href = '#SkBitmap_writePixels_src' > src< / a > < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > < a href = '#Image_Info_Alpha_Type' > must< / a >
< a href = '#Image_Info_Alpha_Type' > match< / a > . < a href = '#Image_Info_Alpha_Type' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorSpace' > colorSpace< / a > < a href = '#SkBitmap_colorSpace' > is< / a > < a href = '#SkBitmap_colorSpace' > nullptr< / a > , < a href = '#SkBitmap_writePixels_src' > src< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > must< / a > < a href = '#Color_Space' > match< / a > . < a href = '#Color_Space' > Returns< / a >
< a href = '#Color_Space' > false< / a > < a href = '#Color_Space' > if< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > not< / a > < a href = 'undocumented#Pixel' > possible< / a > .
2018-05-16 11:07:07 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_writePixels_dstX' > dstX< / a > < a href = '#SkBitmap_writePixels_dstX' > and< / a > < a href = '#SkBitmap_writePixels_dstY' > dstY< / a > < a href = '#SkBitmap_writePixels_dstY' > may< / a > < a href = '#SkBitmap_writePixels_dstY' > be< / a > < a href = '#SkBitmap_writePixels_dstY' > negative< / a > < a href = '#SkBitmap_writePixels_dstY' > to< / a > < a href = '#SkBitmap_writePixels_dstY' > copy< / a > < a href = '#SkBitmap_writePixels_dstY' > only< / a > < a href = '#SkBitmap_writePixels_dstY' > top< / a > < a href = '#SkBitmap_writePixels_dstY' > or< / a > < a href = '#SkBitmap_writePixels_dstY' > left< / a > < a href = '#SkBitmap_writePixels_dstY' > of< / a > < a href = '#SkBitmap_writePixels_dstY' > source< / a > . < a href = '#SkBitmap_writePixels_dstY' > Returns< / a >
< a href = '#SkBitmap_writePixels_dstY' > false< / a > < a href = '#SkBitmap_writePixels_dstY' > if< / a > < a href = '#SkBitmap_width' > width()< / a > < a href = '#SkBitmap_width' > or< / a > < a href = '#SkBitmap_height' > height()< / a > < a href = '#SkBitmap_height' > is< / a > < a href = '#SkBitmap_height' > zero< / a > < a href = '#SkBitmap_height' > or< / a > < a href = '#SkBitmap_height' > negative< / a > .
< a href = '#SkBitmap_height' > Returns< / a > < a href = '#SkBitmap_height' > false< / a > < a href = '#SkBitmap_height' > if< / a > < code > < a href = 'undocumented#abs()' > abs< / a > (< a href = '#SkBitmap_writePixels_dstX' > dstX< / a > ) >= < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_width' > width()< / a > < / code > , or if < code > < a href = 'undocumented#abs()' > abs< / a > (< a href = '#SkBitmap_writePixels_dstY' > dstY< / a > ) >= < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_height' > height()< / a > < / code > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_writePixels_src' > < code > < strong > src< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > source < a href = 'SkPixmap_Reference#Pixmap' > Pixmap< / a > : < a href = '#Image_Info' > Image_Info< / a > , < a href = '#Image_Info' > pixels< / a > , < a href = '#Row_Bytes' > row bytes< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_writePixels_dstX' > < code > < strong > dstX< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > column index whose absolute value is less than < a href = '#SkBitmap_width' > width()< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_writePixels_dstY' > < code > < strong > dstY< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > row index whose absolute value is less than < a href = '#SkBitmap_height' > height()< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = '#SkBitmap_writePixels_src' > src< / a > < a href = '#SkBitmap_writePixels_src' > pixels< / a > < a href = '#SkBitmap_writePixels_src' > are< / a > < a href = '#SkBitmap_writePixels_src' > copied< / a > < a href = '#SkBitmap_writePixels_src' > to< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "9b3133a6673d2514d166398adbe1f9f4" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_readPixels' > readPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_writePixels_2' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_writePixels' > writePixels< / a > (< a href = '#SkBitmap_writePixels' > const< / a > < a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > & < a href = 'SkPixmap_Reference#SkPixmap' > src< / a > )
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies a < a href = 'SkRect_Reference#Rect' > Rect< / a > < a href = 'SkRect_Reference#Rect' > of< / a > < a href = 'SkRect_Reference#Rect' > pixels< / a > < a href = 'SkRect_Reference#Rect' > from< / a > < a href = '#SkBitmap_writePixels_2_src' > src< / a > . < a href = '#SkBitmap_writePixels_2_src' > Copy< / a > < a href = '#SkBitmap_writePixels_2_src' > starts< / a > < a href = '#SkBitmap_writePixels_2_src' > at< / a > (0, 0), < a href = '#SkBitmap_writePixels_2_src' > and< / a > < a href = '#SkBitmap_writePixels_2_src' > does< / a > < a href = '#SkBitmap_writePixels_2_src' > not< / a > < a href = '#SkBitmap_writePixels_2_src' > exceed< / a >
(< a href = '#SkBitmap_writePixels_2_src' > src< / a > .< a href = '#SkPixmap_width' > width()< / a > , < a href = '#SkBitmap_writePixels_2_src' > src< / a > .< a href = '#SkPixmap_height' > height()< / a > ).
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_writePixels_2_src' > src< / a > < a href = '#SkBitmap_writePixels_2_src' > specifies< / a > < a href = '#SkBitmap_writePixels_2_src' > width< / a > , < a href = '#SkBitmap_writePixels_2_src' > height< / a > , < a href = '#Image_Info_Color_Type' > Color_Type< / a > , < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > , < a href = '#Color_Space' > Color_Space< / a > , < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > ,
< a href = 'undocumented#Pixel' > and< / a > < a href = '#Row_Bytes' > row bytes< / a > < a href = 'undocumented#Pixel' > of< / a > < a href = 'undocumented#Pixel' > source< / a > . < a href = '#SkBitmap_writePixels_2_src' > src< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > specifics< / a > < a href = '#SkPixmap_rowBytes' > the< / a > < a href = '#SkPixmap_rowBytes' > gap< / a > < a href = '#SkPixmap_rowBytes' > from< / a > < a href = '#SkPixmap_rowBytes' > one< / a > < a href = '#SkPixmap_rowBytes' > source< / a >
< a href = '#SkPixmap_rowBytes' > row< / a > < a href = '#SkPixmap_rowBytes' > to< / a > < a href = '#SkPixmap_rowBytes' > the< / a > < a href = '#SkPixmap_rowBytes' > next< / a > . < a href = '#SkPixmap_rowBytes' > Returns< / a > < a href = '#SkPixmap_rowBytes' > true< / a > < a href = '#SkPixmap_rowBytes' > if< / a > < a href = '#SkPixmap_rowBytes' > pixels< / a > < a href = '#SkPixmap_rowBytes' > are< / a > < a href = '#SkPixmap_rowBytes' > copied< / a > . < a href = '#SkPixmap_rowBytes' > Returns< / a > < a href = '#SkPixmap_rowBytes' > false< / a > < a href = '#SkPixmap_rowBytes' > if< / a > :
2017-10-04 18:31:33 +00:00
< table > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_writePixels_2_src' > src< / a > < a href = 'undocumented#Pixel_Storage' > pixel storage< / a > < a href = 'undocumented#Pixel' > equals< / a > < a href = 'undocumented#Pixel' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#SkBitmap_writePixels_2_src' > src< / a > .< a href = '#SkPixmap_rowBytes' > rowBytes< / a > () < a href = '#SkPixmap_rowBytes' > is< / a > < a href = '#SkPixmap_rowBytes' > less< / a > < a href = '#SkPixmap_rowBytes' > than< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_minRowBytes' > minRowBytes< / a > ()< / td >
2018-05-16 11:07:07 +00:00
< / tr > < tr >
2018-11-07 19:59:03 +00:00
< td > < a href = '#Pixel_Ref' > Pixel_Ref< / a > < a href = '#Pixel_Ref' > is< / a > < a href = '#Pixel_Ref' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
2017-10-04 18:31:33 +00:00
< / table >
2018-11-07 19:59:03 +00:00
Pixels are copied only if < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > possible< / a > . < a href = 'undocumented#Pixel' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a >
< a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > or< / a > < a href = 'SkImageInfo_Reference#kAlpha_8_SkColorType' > kAlpha_8_SkColorType< / a > ; < a href = '#SkBitmap_writePixels_2_src' > src< / a > < a href = '#Image_Info_Color_Type' > Color_Type< / a > < a href = '#Image_Info_Color_Type' > must< / a > < a href = '#Image_Info_Color_Type' > match< / a > .
< a href = '#Image_Info_Color_Type' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorType' > colorType< / a > < a href = '#SkBitmap_colorType' > is< / a > < a href = 'SkImageInfo_Reference#kGray_8_SkColorType' > kGray_8_SkColorType< / a > , < a href = '#SkBitmap_writePixels_2_src' > src< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > must< / a > < a href = '#Color_Space' > match< / a > .
< a href = '#Color_Space' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_alphaType' > alphaType< / a > < a href = '#SkBitmap_alphaType' > is< / a > < a href = 'SkImageInfo_Reference#kOpaque_SkAlphaType' > kOpaque_SkAlphaType< / a > , < a href = '#SkBitmap_writePixels_2_src' > src< / a > < a href = '#Image_Info_Alpha_Type' > Alpha_Type< / a > < a href = '#Image_Info_Alpha_Type' > must< / a >
< a href = '#Image_Info_Alpha_Type' > match< / a > . < a href = '#Image_Info_Alpha_Type' > If< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a > < a href = '#SkBitmap_colorSpace' > colorSpace< / a > < a href = '#SkBitmap_colorSpace' > is< / a > < a href = '#SkBitmap_colorSpace' > nullptr< / a > , < a href = '#SkBitmap_writePixels_2_src' > src< / a > < a href = '#Color_Space' > Color_Space< / a > < a href = '#Color_Space' > must< / a > < a href = '#Color_Space' > match< / a > . < a href = '#Color_Space' > Returns< / a >
< a href = '#Color_Space' > false< / a > < a href = '#Color_Space' > if< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > conversion< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > not< / a > < a href = 'undocumented#Pixel' > possible< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_writePixels_2_src' > < code > < strong > src< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > source < a href = 'SkPixmap_Reference#Pixmap' > Pixmap< / a > : < a href = '#Image_Info' > Image_Info< / a > , < a href = '#Image_Info' > pixels< / a > , < a href = '#Row_Bytes' > row bytes< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = '#SkBitmap_writePixels_2_src' > src< / a > < a href = '#SkBitmap_writePixels_2_src' > pixels< / a > < a href = '#SkBitmap_writePixels_2_src' > are< / a > < a href = '#SkBitmap_writePixels_2_src' > copied< / a > < a href = '#SkBitmap_writePixels_2_src' > to< / a > < a href = 'SkBitmap_Reference#Bitmap' > Bitmap< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "faa5dfa466f6e16c07c124d971f32679" > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_readPixels' > readPixels< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_extractAlpha' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_extractAlpha' > extractAlpha< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#SkBitmap' > dst< / a > ) < a href = 'SkBitmap_Reference#SkBitmap' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = '#SkBitmap_extractAlpha_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_dst' > to< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > described< / a > < a href = 'SkColor_Reference#Alpha' > by< / a > < a href = 'SkColor_Reference#Alpha' > pixels< / a > . < a href = 'SkColor_Reference#Alpha' > Returns< / a > < a href = 'SkColor_Reference#Alpha' > false< / a > < a href = 'SkColor_Reference#Alpha' > if< / a > < a href = '#SkBitmap_extractAlpha_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_dst' > cannot< / a > < a href = '#SkBitmap_extractAlpha_dst' > be< / a > < a href = '#SkBitmap_extractAlpha_dst' > written< / a > < a href = '#SkBitmap_extractAlpha_dst' > to< / a >
or < a href = '#SkBitmap_extractAlpha_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_dst' > pixels< / a > < a href = '#SkBitmap_extractAlpha_dst' > cannot< / a > < a href = '#SkBitmap_extractAlpha_dst' > be< / a > < a href = '#SkBitmap_extractAlpha_dst' > allocated< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
Uses < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > < a href = '#SkBitmap_HeapAllocator' > to< / a > < a href = '#SkBitmap_HeapAllocator' > reserve< / a > < a href = '#SkBitmap_HeapAllocator' > memory< / a > < a href = '#SkBitmap_HeapAllocator' > for< / a > < a href = '#SkBitmap_extractAlpha_dst' > dst< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_extractAlpha_dst' > < code > < strong > dst< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > holds < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > to< / a > < a href = 'undocumented#SkPixelRef' > fill< / a > < a href = 'undocumented#SkPixelRef' > with< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkCanvas_Reference#Layer' > layer< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkCanvas_Reference#Layer' > layer< / a > < a href = 'SkCanvas_Reference#Layer' > was< / a > < a href = 'SkCanvas_Reference#Layer' > constructed< / a > < a href = 'SkCanvas_Reference#Layer' > in< / a > < a href = '#SkBitmap_extractAlpha_dst' > dst< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "ab6577df079e6c70511cf2bfc6447b44" > < / fiddle-embed > < / div >
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_extractSubset' > extractSubset< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_extractAlpha_2' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_extractAlpha' > extractAlpha< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#SkBitmap' > dst< / a > , < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkPaint_Reference#SkPaint' > SkPaint< / a > * < a href = 'SkPaint_Reference#Paint' > paint< / a > , < a href = 'SkIPoint_Reference#SkIPoint' > SkIPoint< / a > * < a href = 'SkIPoint_Reference#SkIPoint' > offset< / a > ) < a href = 'SkIPoint_Reference#SkIPoint' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = '#SkBitmap_extractAlpha_2_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > to< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > described< / a > < a href = 'SkColor_Reference#Alpha' > by< / a > < a href = 'SkColor_Reference#Alpha' > pixels< / a > . < a href = 'SkColor_Reference#Alpha' > Returns< / a > < a href = 'SkColor_Reference#Alpha' > false< / a > < a href = 'SkColor_Reference#Alpha' > if< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > cannot< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > be< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > written< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > to< / a >
or < a href = '#SkBitmap_extractAlpha_2_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > pixels< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > cannot< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > be< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > allocated< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
If < a href = '#SkBitmap_extractAlpha_2_paint' > paint< / a > < a href = '#SkBitmap_extractAlpha_2_paint' > is< / a > < a href = '#SkBitmap_extractAlpha_2_paint' > not< / a > < a href = '#SkBitmap_extractAlpha_2_paint' > nullptr< / a > < a href = '#SkBitmap_extractAlpha_2_paint' > and< / a > < a href = '#SkBitmap_extractAlpha_2_paint' > contains< / a > < a href = 'undocumented#SkMaskFilter' > SkMaskFilter< / a > , < a href = 'undocumented#SkMaskFilter' > SkMaskFilter< / a >
generates < a href = 'undocumented#Mask_Alpha' > mask alpha< / a > from < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > . < a href = 'SkBitmap_Reference#SkBitmap' > Uses< / a > < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > < a href = '#SkBitmap_HeapAllocator' > to< / a > < a href = '#SkBitmap_HeapAllocator' > reserve< / a > < a href = '#SkBitmap_HeapAllocator' > memory< / a > < a href = '#SkBitmap_HeapAllocator' > for< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > dst< / a >
< a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > . < a href = 'undocumented#SkPixelRef' > Sets< / a > < a href = '#SkBitmap_extractAlpha_2_offset' > offset< / a > < a href = '#SkBitmap_extractAlpha_2_offset' > to< / a > < a href = '#SkBitmap_extractAlpha_2_offset' > top-left< / a > < a href = '#SkBitmap_extractAlpha_2_offset' > position< / a > < a href = '#SkBitmap_extractAlpha_2_offset' > for< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > for< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > alignment< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > with< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > ;
(0, 0) unless < a href = 'undocumented#SkMaskFilter' > SkMaskFilter< / a > < a href = 'undocumented#SkMaskFilter' > generates< / a > < a href = 'undocumented#SkMaskFilter' > mask< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_extractAlpha_2_dst' > < code > < strong > dst< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > holds < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > to< / a > < a href = 'undocumented#SkPixelRef' > fill< / a > < a href = 'undocumented#SkPixelRef' > with< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkCanvas_Reference#Layer' > layer< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_extractAlpha_2_paint' > < code > < strong > paint< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > holds optional < a href = 'undocumented#SkMaskFilter' > SkMaskFilter< / a > ; < a href = 'undocumented#SkMaskFilter' > may< / a > < a href = 'undocumented#SkMaskFilter' > be< / a > < a href = 'undocumented#SkMaskFilter' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_extractAlpha_2_offset' > < code > < strong > offset< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > top-left position for < a href = '#SkBitmap_extractAlpha_2_dst' > dst< / a > ; < a href = '#SkBitmap_extractAlpha_2_dst' > may< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > be< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > nullptr< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkCanvas_Reference#Layer' > layer< / a > < a href = 'SkCanvas_Reference#Layer' > was< / a > < a href = 'SkCanvas_Reference#Layer' > constructed< / a > < a href = 'SkCanvas_Reference#Layer' > in< / a > < a href = '#SkBitmap_extractAlpha_2_dst' > dst< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-18 20:21:51 +00:00
< div > < fiddle-embed name = "092739b4cd5d732a27c07ced8ef45f01" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_extractSubset' > extractSubset< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_extractAlpha_3' > < / a >
2018-01-26 17:56:22 +00:00
2018-10-16 14:30:28 +00:00
---
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_extractAlpha' > extractAlpha< / a > (< a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > * < a href = 'SkBitmap_Reference#SkBitmap' > dst< / a > , < a href = 'SkBitmap_Reference#SkBitmap' > const< / a > < a href = 'SkPaint_Reference#SkPaint' > SkPaint< / a > * < a href = 'SkPaint_Reference#Paint' > paint< / a > , < a href = '#SkBitmap_Allocator' > Allocator< / a > * < a href = '#SkBitmap_Allocator' > allocator< / a > , < a href = 'SkIPoint_Reference#SkIPoint' > SkIPoint< / a > * < a href = 'SkIPoint_Reference#SkIPoint' > offset< / a > ) < a href = 'SkIPoint_Reference#SkIPoint' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Sets < a href = '#SkBitmap_extractAlpha_3_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > to< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkColor_Reference#Alpha' > described< / a > < a href = 'SkColor_Reference#Alpha' > by< / a > < a href = 'SkColor_Reference#Alpha' > pixels< / a > . < a href = 'SkColor_Reference#Alpha' > Returns< / a > < a href = 'SkColor_Reference#Alpha' > false< / a > < a href = 'SkColor_Reference#Alpha' > if< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > cannot< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > be< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > written< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > to< / a >
or < a href = '#SkBitmap_extractAlpha_3_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > pixels< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > cannot< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > be< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > allocated< / a > .
2017-10-04 18:31:33 +00:00
2018-11-07 19:59:03 +00:00
If < a href = '#SkBitmap_extractAlpha_3_paint' > paint< / a > < a href = '#SkBitmap_extractAlpha_3_paint' > is< / a > < a href = '#SkBitmap_extractAlpha_3_paint' > not< / a > < a href = '#SkBitmap_extractAlpha_3_paint' > nullptr< / a > < a href = '#SkBitmap_extractAlpha_3_paint' > and< / a > < a href = '#SkBitmap_extractAlpha_3_paint' > contains< / a > < a href = 'undocumented#SkMaskFilter' > SkMaskFilter< / a > , < a href = 'undocumented#SkMaskFilter' > SkMaskFilter< / a >
generates < a href = 'undocumented#Mask_Alpha' > mask alpha< / a > from < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > . < a href = '#SkBitmap_extractAlpha_3_allocator' > allocator< / a > < a href = '#SkBitmap_extractAlpha_3_allocator' > may< / a > < a href = '#SkBitmap_extractAlpha_3_allocator' > reference< / a > < a href = '#SkBitmap_extractAlpha_3_allocator' > a< / a > < a href = '#SkBitmap_extractAlpha_3_allocator' > custom< / a > < a href = '#SkBitmap_extractAlpha_3_allocator' > allocation< / a >
class or be set to nullptr to use < a href = '#SkBitmap_HeapAllocator' > HeapAllocator< / a > . < a href = '#SkBitmap_HeapAllocator' > Sets< / a > < a href = '#SkBitmap_extractAlpha_3_offset' > offset< / a > < a href = '#SkBitmap_extractAlpha_3_offset' > to< / a > < a href = '#SkBitmap_extractAlpha_3_offset' > top-left< / a >
position for < a href = '#SkBitmap_extractAlpha_3_dst' > dst< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > for< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > alignment< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > with< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > ; (0, 0) < a href = 'SkBitmap_Reference#SkBitmap' > unless< / a > < a href = 'undocumented#SkMaskFilter' > SkMaskFilter< / a > < a href = 'undocumented#SkMaskFilter' > generates< / a >
2017-10-04 18:31:33 +00:00
mask.
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_extractAlpha_3_dst' > < code > < strong > dst< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > holds < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > < a href = 'undocumented#SkPixelRef' > to< / a > < a href = 'undocumented#SkPixelRef' > fill< / a > < a href = 'undocumented#SkPixelRef' > with< / a > < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkCanvas_Reference#Layer' > layer< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_extractAlpha_3_paint' > < code > < strong > paint< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > holds optional < a href = 'undocumented#SkMaskFilter' > SkMaskFilter< / a > ; < a href = 'undocumented#SkMaskFilter' > may< / a > < a href = 'undocumented#SkMaskFilter' > be< / a > < a href = 'undocumented#SkMaskFilter' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_extractAlpha_3_allocator' > < code > < strong > allocator< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > function to reserve memory for < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a > ; < a href = 'undocumented#SkPixelRef' > may< / a > < a href = 'undocumented#SkPixelRef' > be< / a > < a href = 'undocumented#SkPixelRef' > nullptr< / a > < / td >
2018-05-16 11:07:07 +00:00
< / tr >
< tr > < td > < a name = 'SkBitmap_extractAlpha_3_offset' > < code > < strong > offset< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > top-left position for < a href = '#SkBitmap_extractAlpha_3_dst' > dst< / a > ; < a href = '#SkBitmap_extractAlpha_3_dst' > may< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > be< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > nullptr< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkColor_Reference#Alpha' > alpha< / a > < a href = 'SkCanvas_Reference#Layer' > layer< / a > < a href = 'SkCanvas_Reference#Layer' > was< / a > < a href = 'SkCanvas_Reference#Layer' > constructed< / a > < a href = 'SkCanvas_Reference#Layer' > in< / a > < a href = '#SkBitmap_extractAlpha_3_dst' > dst< / a > < a href = 'undocumented#SkPixelRef' > SkPixelRef< / a >
2017-10-04 18:31:33 +00:00
### Example
2018-07-19 14:50:44 +00:00
< div > < fiddle-embed name = "cd7543fa8c9f3cede46dc2d72eb8c4bd" > < / fiddle-embed > < / div >
2017-10-04 18:31:33 +00:00
### See Also
2018-05-16 11:07:07 +00:00
< a href = '#SkBitmap_extractSubset' > extractSubset< / a >
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_peekPixels' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-04 18:31:33 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
bool < a href = '#SkBitmap_peekPixels' > peekPixels< / a > (< a href = 'SkPixmap_Reference#SkPixmap' > SkPixmap< / a > * < a href = 'SkPixmap_Reference#Pixmap' > pixmap< / a > ) < a href = 'SkPixmap_Reference#Pixmap' > const< / a >
2017-10-04 18:31:33 +00:00
< / pre >
2018-11-07 19:59:03 +00:00
Copies < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a > , < a href = '#Row_Bytes' > row bytes< / a > , < a href = 'undocumented#Pixel' > and< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > < a href = 'SkImageInfo_Reference#SkImageInfo' > to< / a > < a href = '#SkBitmap_peekPixels_pixmap' > pixmap< / a > , < a href = '#SkBitmap_peekPixels_pixmap' > if< / a > < a href = '#SkBitmap_peekPixels_pixmap' > address< / a >
is available, and returns true. If < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > address< / a > < a href = 'undocumented#Pixel' > is< / a > < a href = 'undocumented#Pixel' > not< / a > < a href = 'undocumented#Pixel' > available< / a > , < a href = 'undocumented#Pixel' > return< / a >
false and leave < a href = '#SkBitmap_peekPixels_pixmap' > pixmap< / a > < a href = '#SkBitmap_peekPixels_pixmap' > unchanged< / a > .
2017-10-26 11:58:48 +00:00
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_peekPixels_pixmap' > pixmap< / a > < a href = '#SkBitmap_peekPixels_pixmap' > contents< / a > < a href = '#SkBitmap_peekPixels_pixmap' > become< / a > < a href = '#SkBitmap_peekPixels_pixmap' > invalid< / a > < a href = '#SkBitmap_peekPixels_pixmap' > on< / a > < a href = '#SkBitmap_peekPixels_pixmap' > any< / a > < a href = '#SkBitmap_peekPixels_pixmap' > future< / a > < a href = '#SkBitmap_peekPixels_pixmap' > change< / a > < a href = '#SkBitmap_peekPixels_pixmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > .
2017-10-04 18:31:33 +00:00
### Parameters
2018-05-16 11:07:07 +00:00
< table > < tr > < td > < a name = 'SkBitmap_peekPixels_pixmap' > < code > < strong > pixmap< / strong > < / code > < / a > < / td >
2018-11-07 19:59:03 +00:00
< td > storage for < a href = 'undocumented#Pixel' > pixel< / a > < a href = 'undocumented#Pixel' > state< / a > < a href = 'undocumented#Pixel' > if< / a > < a href = 'undocumented#Pixel' > pixels< / a > < a href = 'undocumented#Pixel' > are< / a > < a href = 'undocumented#Pixel' > readable< / a > ; < a href = 'undocumented#Pixel' > otherwise< / a > , < a href = 'undocumented#Pixel' > ignored< / a > < / td >
2017-10-04 18:31:33 +00:00
< / tr >
< / table >
### Return Value
2018-11-07 19:59:03 +00:00
true if < a href = 'SkBitmap_Reference#SkBitmap' > SkBitmap< / a > < a href = 'SkBitmap_Reference#SkBitmap' > has< / a > < a href = 'SkBitmap_Reference#SkBitmap' > direct< / a > < a href = 'SkBitmap_Reference#SkBitmap' > access< / a > < a href = 'SkBitmap_Reference#SkBitmap' > to< / a > < a href = 'SkBitmap_Reference#SkBitmap' > pixels< / a >
2017-10-04 18:31:33 +00:00
### Example
< div > < fiddle-embed name = "0cc2c6a0dffa61a88711534bd3d43b40" >
#### Example Output
~~~~
------
2017-11-27 15:44:06 +00:00
-xxx--
x---x-
2017-10-04 18:31:33 +00:00
----x-
2017-11-27 15:44:06 +00:00
---x--
--x---
2017-10-04 18:31:33 +00:00
--x---
------
--x---
--x---
------
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = '#SkBitmap_peekPixels_pixmap' > pixmap< / a > < a href = '#SkBitmap_installPixels' > installPixels< / a > < a href = '#SkBitmap_readPixels' > readPixels< / a > < a href = '#SkBitmap_writePixels' > writePixels< / a >
2017-10-04 18:31:33 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Utility' > < / a >
2018-02-07 12:27:09 +00:00
2018-05-16 11:07:07 +00:00
< a name = 'SkBitmap_validate' > < / a >
2018-10-16 14:30:28 +00:00
---
2017-10-26 11:58:48 +00:00
2018-05-16 11:07:07 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
void < a href = '#SkBitmap_validate' > validate()< / a > < a href = '#SkBitmap_validate' > const< / a > ;
2017-10-26 11:58:48 +00:00
< / pre >
### See Also
2018-11-07 19:59:03 +00:00
< a href = 'SkImageInfo_Reference#SkImageInfo' > SkImageInfo< / a > ::< a href = '#SkImageInfo_validate' > validate< / a >
2017-10-26 11:58:48 +00:00