

<a name="fontgate.fgBitmap"></a>

# `fgBitmap`


<dt class="class"><h2><span class="class-name">fontgate.fgBitmap</span> = <a name="fontgate.fgBitmap" href="#fontgate.fgBitmap">class fgBitmap</a>(<a href="./__builtin__.html#object">object</a>)</h2></dt><dd class="class"><dd>


<pre class="doc" markdown="0">Bitmap representation

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


</dd><h4 class="head-methods">Methods </h4><dl class="function"><dt><a name="fgBitmap-__add__" href="#fgBitmap-__add__"><span class="function-name">__add__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__add__">__add__</a>(y) <==> x+y</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__cmp__" href="#fgBitmap-__cmp__"><span class="function-name">__cmp__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__cmp__">__cmp__</a>(y) <==> cmp(x,y)</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__delattr__" href="#fgBitmap-__delattr__"><span class="function-name">__delattr__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__delattr__">__delattr__</a>('name') <==> del x.name</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__delitem__" href="#fgBitmap-__delitem__"><span class="function-name">__delitem__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__delitem__">__delitem__</a>(y) <==> del x[y]</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__delslice__" href="#fgBitmap-__delslice__"><span class="function-name">__delslice__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__delslice__">__delslice__</a>(i, j) <==> del x[i:j]

Use of negative indices is not supported.</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__eq__" href="#fgBitmap-__eq__"><span class="function-name">__eq__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__eq__">__eq__</a>(y) <==> x==y</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__ge__" href="#fgBitmap-__ge__"><span class="function-name">__ge__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__ge__">__ge__</a>(y) <==> x>=y</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__getattribute__" href="#fgBitmap-__getattribute__"><span class="function-name">__getattribute__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__getattribute__">__getattribute__</a>('name') <==> x.name</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__getitem__" href="#fgBitmap-__getitem__"><span class="function-name">__getitem__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__getitem__">__getitem__</a>(y) <==> x[y]</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__getslice__" href="#fgBitmap-__getslice__"><span class="function-name">__getslice__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__getslice__">__getslice__</a>(i, j) <==> x[i:j]

Use of negative indices is not supported.</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__gt__" href="#fgBitmap-__gt__"><span class="function-name">__gt__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__gt__">__gt__</a>(y) <==> x>y</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__init__" href="#fgBitmap-__init__"><span class="function-name">__init__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__le__" href="#fgBitmap-__le__"><span class="function-name">__le__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__le__">__le__</a>(y) <==> x<=y</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__len__" href="#fgBitmap-__len__"><span class="function-name">__len__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__len__">__len__</a>() <==> len(x)</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__lt__" href="#fgBitmap-__lt__"><span class="function-name">__lt__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__lt__">__lt__</a>(y) <==> x<y</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__mul__" href="#fgBitmap-__mul__"><span class="function-name">__mul__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__mul__">__mul__</a>(n) <==> x*n</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__ne__" href="#fgBitmap-__ne__"><span class="function-name">__ne__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__ne__">__ne__</a>(y) <==> x!=y</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__repr__" href="#fgBitmap-__repr__"><span class="function-name">__repr__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__repr__">__repr__</a>() <==> repr(x)</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__rmul__" href="#fgBitmap-__rmul__"><span class="function-name">__rmul__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__rmul__">__rmul__</a>(n) <==> n*x</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__setattr__" href="#fgBitmap-__setattr__"><span class="function-name">__setattr__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__setattr__">__setattr__</a>('name', value) <==> x.name = value</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__setitem__" href="#fgBitmap-__setitem__"><span class="function-name">__setitem__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__setslice__" href="#fgBitmap-__setslice__"><span class="function-name">__setslice__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__setslice__">__setslice__</a>(i, j, y) <==> x[i:j]=y

Use  of negative indices is not supported.</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-__str__" href="#fgBitmap-__str__"><span class="function-name">__str__</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">x.<a href="#fontgate.fgBitmap-__str__">__str__</a>() <==> str(x)</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-asDict" href="#fgBitmap-asDict"><span class="function-name">asDict</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">represent object as dictionary</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-asTuple" href="#fgBitmap-asTuple"><span class="function-name">asTuple</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">represent object as tuple</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-clear" href="#fgBitmap-clear"><span class="function-name">clear</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">clear all data</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-clone" href="#fgBitmap-clone"><span class="function-name">clone</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"><a href="#fontgate.fgBitmap-clone">clone</a>(fgBitmap source) - make clone of source bitmap</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-copy" href="#fgBitmap-copy"><span class="function-name">copy</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"><a href="#fontgate.fgBitmap-copy">copy</a>(fgBitmap source[, x, y, w, h]) - copy whole source bitmap or part of it with size (w, h) from pos (x, y)</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-copyData" href="#fgBitmap-copyData"><span class="function-name">copyData</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"><a href="#fontgate.fgBitmap-copy">copy</a>(bytesarray) - assign new bitmap data</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-create" href="#fgBitmap-create"><span class="function-name">create</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"><a href="#fontgate.fgBitmap-create">create</a>(<same as constructor's arguments>') - allocate new bitmap data</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-downsample" href="#fgBitmap-downsample"><span class="function-name">downsample</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"><a href="#fontgate.fgBitmap-downsample">downsample</a>(fgBitmap, int oversampling)</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-empty" href="#fgBitmap-empty"><span class="function-name">empty</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">bool <a href="#fontgate.fgBitmap-empty">empty</a>() - return true if no data assigned or bitmap size is 0</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-emptyRow" href="#fgBitmap-emptyRow"><span class="function-name">emptyRow</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"><a href="#fontgate.fgBitmap-emptyRow">emptyRow</a>(y, x0, x1) - return true if part of row y from x0 till x1 has no non-zero pixels</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-fill" href="#fgBitmap-fill"><span class="function-name">fill</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"><a href="#fontgate.fgBitmap-fill">fill</a>(fgColor color) - fill entire bitmap by color</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-flipV" href="#fgBitmap-flipV"><span class="function-name">flipV</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">flip bitmap by vertical axis</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-getPixel" href="#fgBitmap-getPixel"><span class="function-name">getPixel</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">fgColor <a href="#fontgate.fgBitmap-getPixel">getPixel</a>(x, y) - get color of pixel (x, y)</pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-row" href="#fgBitmap-row"><span class="function-name">row</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"></pre>

</dd></dl>
<dl class="function"><dt><a name="fgBitmap-setPixel" href="#fgBitmap-setPixel"><span class="function-name">setPixel</span></a><span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0"><a href="#fontgate.fgBitmap-setPixel">setPixel</a>(x, y, fgColor color) - set color for pixel (x, y)</pre>

</dd></dl>

  <h4 class="head-desc">Descriptors </h4><dl class="descriptor"><dt>bpp</dt>
<dd>

<pre class="doc" markdown="0">bits per pixel</pre>

</dd>
</dl>
<dl class="descriptor"><dt>bytes</dt>
<dd>

<pre class="doc" markdown="0">bytes per row</pre>

</dd>
</dl>
<dl class="descriptor"><dt>data</dt>
<dd>

<pre class="doc" markdown="0">bitmap data</pre>

</dd>
</dl>
<dl class="descriptor"><dt>height</dt>
<dd>

<pre class="doc" markdown="0">bitmap height in pixels</pre>

</dd>
</dl>
<dl class="descriptor"><dt>size</dt>
<dd>

<pre class="doc" markdown="0">overall bytes count for bitmap storage</pre>

</dd>
</dl>
<dl class="descriptor"><dt>width</dt>
<dd>

<pre class="doc" markdown="0">bitmap width in pixels</pre>

</dd>
</dl>

  <h4 class="head-attrs">Attributes </h4><dl><dt><span class="other-name">__new__</span> = &lt;built-in method __new__ of type object&gt;<dd>

<pre class="doc" markdown="0">T.<a href="#fontgate.fgBitmap-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</pre>

</dd></dl>
</dd>


<a name="fontgate.fgBitmap.asDict"></a>

## `asDict`


<dl class="function"><dt><a name="-fontgate.fgBitmap.asDict" href="#-fontgate.fgBitmap.asDict"><span class="function-name">fontgate.fgBitmap.asDict</span></a> = asDict<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">represent object as dictionary</pre>

</dd></dl>



<a name="fontgate.fgBitmap.asTuple"></a>

## `asTuple`


<dl class="function"><dt><a name="-fontgate.fgBitmap.asTuple" href="#-fontgate.fgBitmap.asTuple"><span class="function-name">fontgate.fgBitmap.asTuple</span></a> = asTuple<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">represent object as tuple</pre>

</dd></dl>



<a name="fontgate.fgBitmap.bpp"></a>

## `bpp`


<dl class="descriptor"><dt>fontgate.fgBitmap.bpp</dt>
<dd>

<pre class="doc" markdown="0">bits per pixel</pre>

</dd>
</dl>



<a name="fontgate.fgBitmap.bytes"></a>

## `bytes`


<dl class="descriptor"><dt>fontgate.fgBitmap.bytes</dt>
<dd>

<pre class="doc" markdown="0">bytes per row</pre>

</dd>
</dl>



<a name="fontgate.fgBitmap.clear"></a>

## `clear`


<dl class="function"><dt><a name="-fontgate.fgBitmap.clear" href="#-fontgate.fgBitmap.clear"><span class="function-name">fontgate.fgBitmap.clear</span></a> = clear<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">clear all data</pre>

</dd></dl>



<a name="fontgate.fgBitmap.clone"></a>

## `clone`


<dl class="function"><dt><a name="-fontgate.fgBitmap.clone" href="#-fontgate.fgBitmap.clone"><span class="function-name">fontgate.fgBitmap.clone</span></a> = clone<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">clone(fgBitmap source) - make clone of source bitmap</pre>

</dd></dl>



<a name="fontgate.fgBitmap.copy"></a>

## `copy`


<dl class="function"><dt><a name="-fontgate.fgBitmap.copy" href="#-fontgate.fgBitmap.copy"><span class="function-name">fontgate.fgBitmap.copy</span></a> = copy<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">copy(fgBitmap source[, x, y, w, h]) - copy whole source bitmap or part of it with size (w, h) from pos (x, y)</pre>

</dd></dl>



<a name="fontgate.fgBitmap.copyData"></a>

## `copyData`


<dl class="function"><dt><a name="-fontgate.fgBitmap.copyData" href="#-fontgate.fgBitmap.copyData"><span class="function-name">fontgate.fgBitmap.copyData</span></a> = copyData<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">copy(bytesarray) - assign new bitmap data</pre>

</dd></dl>



<a name="fontgate.fgBitmap.create"></a>

## `create`


<dl class="function"><dt><a name="-fontgate.fgBitmap.create" href="#-fontgate.fgBitmap.create"><span class="function-name">fontgate.fgBitmap.create</span></a> = create<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">create(<same as constructor's arguments>') - allocate new bitmap data</pre>

</dd></dl>



<a name="fontgate.fgBitmap.data"></a>

## `data`


<dl class="descriptor"><dt>fontgate.fgBitmap.data</dt>
<dd>

<pre class="doc" markdown="0">bitmap data</pre>

</dd>
</dl>



<a name="fontgate.fgBitmap.downsample"></a>

## `downsample`


<dl class="function"><dt><a name="-fontgate.fgBitmap.downsample" href="#-fontgate.fgBitmap.downsample"><span class="function-name">fontgate.fgBitmap.downsample</span></a> = downsample<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">downsample(fgBitmap, int oversampling)</pre>

</dd></dl>



<a name="fontgate.fgBitmap.empty"></a>

## `empty`


<dl class="function"><dt><a name="-fontgate.fgBitmap.empty" href="#-fontgate.fgBitmap.empty"><span class="function-name">fontgate.fgBitmap.empty</span></a> = empty<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">bool empty() - return true if no data assigned or bitmap size is 0</pre>

</dd></dl>



<a name="fontgate.fgBitmap.emptyRow"></a>

## `emptyRow`


<dl class="function"><dt><a name="-fontgate.fgBitmap.emptyRow" href="#-fontgate.fgBitmap.emptyRow"><span class="function-name">fontgate.fgBitmap.emptyRow</span></a> = emptyRow<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">emptyRow(y, x0, x1) - return true if part of row y from x0 till x1 has no non-zero pixels</pre>

</dd></dl>



<a name="fontgate.fgBitmap.fill"></a>

## `fill`


<dl class="function"><dt><a name="-fontgate.fgBitmap.fill" href="#-fontgate.fgBitmap.fill"><span class="function-name">fontgate.fgBitmap.fill</span></a> = fill<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">fill(fgColor color) - fill entire bitmap by color</pre>

</dd></dl>



<a name="fontgate.fgBitmap.flipV"></a>

## `flipV`


<dl class="function"><dt><a name="-fontgate.fgBitmap.flipV" href="#-fontgate.fgBitmap.flipV"><span class="function-name">fontgate.fgBitmap.flipV</span></a> = flipV<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">flip bitmap by vertical axis</pre>

</dd></dl>



<a name="fontgate.fgBitmap.getPixel"></a>

## `getPixel`


<dl class="function"><dt><a name="-fontgate.fgBitmap.getPixel" href="#-fontgate.fgBitmap.getPixel"><span class="function-name">fontgate.fgBitmap.getPixel</span></a> = getPixel<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">fgColor getPixel(x, y) - get color of pixel (x, y)</pre>

</dd></dl>



<a name="fontgate.fgBitmap.height"></a>

## `height`


<dl class="descriptor"><dt>fontgate.fgBitmap.height</dt>
<dd>

<pre class="doc" markdown="0">bitmap height in pixels</pre>

</dd>
</dl>



<a name="fontgate.fgBitmap.setPixel"></a>

## `setPixel`


<dl class="function"><dt><a name="-fontgate.fgBitmap.setPixel" href="#-fontgate.fgBitmap.setPixel"><span class="function-name">fontgate.fgBitmap.setPixel</span></a> = setPixel<span class="argspec">(...)</span></dt><dd>

<pre class="doc" markdown="0">setPixel(x, y, fgColor color) - set color for pixel (x, y)</pre>

</dd></dl>



<a name="fontgate.fgBitmap.size"></a>

## `size`


<dl class="descriptor"><dt>fontgate.fgBitmap.size</dt>
<dd>

<pre class="doc" markdown="0">overall bytes count for bitmap storage</pre>

</dd>
</dl>



<a name="fontgate.fgBitmap.width"></a>

## `width`


<dl class="descriptor"><dt>fontgate.fgBitmap.width</dt>
<dd>

<pre class="doc" markdown="0">bitmap width in pixels</pre>

</dd>
</dl>

