fgBitmap

fontgate.fgBitmap = class fgBitmap(object)

Bitmap representation

Constructors:
  fgBitmap() - default
  fgBitmap(fgBitmap) - make orphan copy of another object
  fgBitmap(width, height, bitsPerPixel)
  fgBitmap(width, height, rowBytes, bitsPerPixel, bytesarray)

Methods

__add__(...)
x.__add__(y) <==> x+y
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__delattr__(...)
x.__delattr__('name') <==> del x.name
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__delslice__(...)
x.__delslice__(i, j) <==> del x[i:j]

Use of negative indices is not supported.
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]

Use of negative indices is not supported.
__gt__(...)
x.__gt__(y) <==> x>y
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x

__mul__(...)
x.__mul__(n) <==> x*n
__ne__(...)
x.__ne__(y) <==> x!=y
__repr__(...)
x.__repr__() <==> repr(x)
__rmul__(...)
x.__rmul__(n) <==> n*x
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
__setslice__(...)
x.__setslice__(i, j, y) <==> x[i:j]=y

Use  of negative indices is not supported.
__str__(...)
x.__str__() <==> str(x)
asDict(...)
represent object as dictionary
asTuple(...)
represent object as tuple
clear(...)
clear all data
clone(...)
clone(fgBitmap source) - make clone of source bitmap
copy(...)
copy(fgBitmap source[, x, y, w, h]) - copy whole source bitmap or part of it with size (w, h) from pos (x, y)
copyData(...)
copy(bytesarray) - assign new bitmap data
create(...)
create(') - allocate new bitmap data
downsample(...)
downsample(fgBitmap, int oversampling)
empty(...)
bool empty() - return true if no data assigned or bitmap size is 0
emptyRow(...)
emptyRow(y, x0, x1) - return true if part of row y from x0 till x1 has no non-zero pixels
fill(...)
fill(fgColor color) - fill entire bitmap by color
flipV(...)
flip bitmap by vertical axis
getPixel(...)
fgColor getPixel(x, y) - get color of pixel (x, y)
row(...)


setPixel(...)
setPixel(x, y, fgColor color) - set color for pixel (x, y)

Descriptors

bpp
bits per pixel
bytes
bytes per row
data
bitmap data
height
bitmap height in pixels
size
overall bytes count for bitmap storage
width
bitmap width in pixels

Attributes

__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

asDict

fontgate.fgBitmap.asDict = asDict(...)
represent object as dictionary

asTuple

fontgate.fgBitmap.asTuple = asTuple(...)
represent object as tuple

bpp

fontgate.fgBitmap.bpp
bits per pixel

bytes

fontgate.fgBitmap.bytes
bytes per row

clear

fontgate.fgBitmap.clear = clear(...)
clear all data

clone

fontgate.fgBitmap.clone = clone(...)
clone(fgBitmap source) - make clone of source bitmap

copy

fontgate.fgBitmap.copy = copy(...)
copy(fgBitmap source[, x, y, w, h]) - copy whole source bitmap or part of it with size (w, h) from pos (x, y)

copyData

fontgate.fgBitmap.copyData = copyData(...)
copy(bytesarray) - assign new bitmap data

create

fontgate.fgBitmap.create = create(...)
create(') - allocate new bitmap data

data

fontgate.fgBitmap.data
bitmap data

downsample

fontgate.fgBitmap.downsample = downsample(...)
downsample(fgBitmap, int oversampling)

empty

fontgate.fgBitmap.empty = empty(...)
bool empty() - return true if no data assigned or bitmap size is 0

emptyRow

fontgate.fgBitmap.emptyRow = emptyRow(...)
emptyRow(y, x0, x1) - return true if part of row y from x0 till x1 has no non-zero pixels

fill

fontgate.fgBitmap.fill = fill(...)
fill(fgColor color) - fill entire bitmap by color

flipV

fontgate.fgBitmap.flipV = flipV(...)
flip bitmap by vertical axis

getPixel

fontgate.fgBitmap.getPixel = getPixel(...)
fgColor getPixel(x, y) - get color of pixel (x, y)

height

fontgate.fgBitmap.height
bitmap height in pixels

setPixel

fontgate.fgBitmap.setPixel = setPixel(...)
setPixel(x, y, fgColor color) - set color for pixel (x, y)

size

fontgate.fgBitmap.size
overall bytes count for bitmap storage

width

fontgate.fgBitmap.width
bitmap width in pixels