Skia
2D Graphics Library
SkCanvas::Lattice Struct Reference

#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 RectTypefRectTypes
 array of fill types More...
 
int fXCount
 number of x-coordinates More...
 
int fYCount
 number of y-coordinates More...
 
const SkIRectfBounds
 source bounds to draw from More...
 
const SkColorfColors
 array of colors More...
 

Detailed Description

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.

Member Enumeration Documentation

◆ RectType

Enumerator
kDefault 

draws SkBitmap into lattice rectangle

kTransparent 

skips lattice rectangle by making it transparent

kFixedColor 

draws one of fColors into lattice rectangle

Member Data Documentation

◆ fBounds

const SkIRect* SkCanvas::Lattice::fBounds

source bounds to draw from

◆ fColors

const SkColor* SkCanvas::Lattice::fColors

array of colors

◆ fRectTypes

const RectType* SkCanvas::Lattice::fRectTypes

array of fill types

◆ fXCount

int SkCanvas::Lattice::fXCount

number of x-coordinates

◆ fXDivs

const int* SkCanvas::Lattice::fXDivs

x-axis values dividing bitmap

◆ fYCount

int SkCanvas::Lattice::fYCount

number of y-coordinates

◆ fYDivs

const int* SkCanvas::Lattice::fYDivs

y-axis values dividing bitmap


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