Skia
2D Graphics Library
|
SkCanvas::Lattice divides SkBitmap or SkImage into a rectangular grid. More...
#include <SkCanvas.h>
Public Types | |
enum | RectType : uint8_t { kDefault = 0 , kTransparent , kFixedColor } |
Public Attributes | |
const int * | fXDivs |
x-axis values dividing bitmap More... | |
const int * | fYDivs |
y-axis values dividing bitmap More... | |
const RectType * | fRectTypes |
array of fill types More... | |
int | fXCount |
number of x-coordinates More... | |
int | fYCount |
number of y-coordinates More... | |
const SkIRect * | fBounds |
source bounds to draw from More... | |
const SkColor * | fColors |
array of colors More... | |
SkCanvas::Lattice divides SkBitmap or SkImage into a rectangular grid.
Grid entries on even columns and even rows are fixed; these entries are always drawn at their original size if the destination is large enough. If the destination side is too small to hold the fixed entries, all fixed entries are proportionately scaled down to fit. The grid entries not on even columns and rows are scaled to fit the remaining space, if any.
enum SkCanvas::Lattice::RectType : uint8_t |
Enumerator | |
---|---|
kDefault | draws SkBitmap into lattice rectangle |
kTransparent | skips lattice rectangle by making it transparent |
kFixedColor | draws one of fColors into lattice rectangle |
const SkIRect* SkCanvas::Lattice::fBounds |
source bounds to draw from
const SkColor* SkCanvas::Lattice::fColors |
array of colors
const RectType* SkCanvas::Lattice::fRectTypes |
array of fill types
int SkCanvas::Lattice::fXCount |
number of x-coordinates
const int* SkCanvas::Lattice::fXDivs |
x-axis values dividing bitmap
int SkCanvas::Lattice::fYCount |
number of y-coordinates
const int* SkCanvas::Lattice::fYDivs |
y-axis values dividing bitmap