FL.objects.Image.Image

class FL.objects.Image.Image(width_or_image: int | Image | None = None, height: int | None = None)

Bases: object

__init__(width_or_image: int | Image | None = None, height: int | None = None) None

Image - class to represent image

Image()

generic constructor, creates an Image with zero coordinates

Image(Image)

copy constructor

Image(int width, int height)

creates an Image of given size

Methods

Clear()

Clears the image

Create(width, height)

Creates a blank image of given size.

GetPixel(p)

HLine(x0, x1, y, color)

ImageBlt(dest, source_rect, dest_point)

Invert()

SetPixel(p)

Trace(glyph)

Traces the image with the current option and adds it to the glyph

__init__([width_or_image, height])

Image - class to represent image

fake_deserialize(data)

fake_serialize()

Attributes

data

Access the image buffer

empty

The empty status of the image

height

Dimensions of the image

size

The size of the image buffer

traceenabled

There is a possibility to trace the image with the Trace command

width

Dimensions of the image

Clear() None

Clears the image

Create(width: int, height: int) None

Creates a blank image of given size.

Parameters:
  • width (int) – The width in pixels

  • height (int) – The height in pixels

Trace(glyph: Glyph) None

Traces the image with the current option and adds it to the glyph

Parameters:

glyph (Glyph) – The glyph to which the traced outline will be added

property data: list[int]

Access the image buffer

Returns:

_description_

Return type:

list[int] | None

property empty: int

The empty status of the image

Returns:

Whether the image is empty

Return type:

int

property height: int

Dimensions of the image

Returns:

The height of the image in pixels

Return type:

int

property size: int

The size of the image buffer

Returns:

The size of the image buffer

Return type:

int

property traceenabled: int

There is a possibility to trace the image with the Trace command

Returns:

Whether the image can be traced

Return type:

int

property width: int

Dimensions of the image

Returns:

The width of the image in pixels

Return type:

int