Canvas.Lattice

class Lattice

Canvas.Lattice divides Bitmap or Image 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.

Classes

RectType

Members:

Methods

__init__

Attributes

fBounds

source bounds to draw from

fColors

array of colors

fRectTypes

array of fill types

fXCount

number of x-coordinates

fXDivs

x-axis values dividing bitmap

fYCount

number of y-coordinates

fYDivs

y-axis values dividing bitmap

kDefault

kFixedColor

kTransparent

Methods

Lattice.__init__(*args, **kwargs)

Attributes

Lattice.fBounds

source bounds to draw from

Lattice.fColors

array of colors

Lattice.fRectTypes

array of fill types

Lattice.fXCount

number of x-coordinates

Lattice.fXDivs

x-axis values dividing bitmap

Lattice.fYCount

number of y-coordinates

Lattice.fYDivs

y-axis values dividing bitmap

Lattice.kDefault = <RectType.kDefault: 0>
Lattice.kFixedColor = <RectType.kFixedColor: 2>
Lattice.kTransparent = <RectType.kTransparent: 1>