Skip to content

fontlab.flCanvas · declarations 001

Back to fontlab.flCanvas

Listeners instance-attribute

Listeners: dict

OverOwner instance-attribute

OverOwner: int

SetMetricsAuto instance-attribute

SetMetricsAuto: int

SetMetricsDefault instance-attribute

SetMetricsDefault: int

SetMetricsZero instance-attribute

SetMetricsZero: int

UnderOwner instance-attribute

UnderOwner: int

_finalize_smart_angles

_finalize_smart_angles() -> bool

bool _finalize_smart_angles()

Finalises any pending smart angle changes.

Source: FontLab Proteus API documentation

acceptEvents

acceptEvents() -> int

int acceptEvents()

activateEditor

activateEditor(canvas_pos: QPointF) -> None

void activateEditor(QPointF canvas_pos)

activatePreviewNodes

activatePreviewNodes() -> Any

activatePreviewNodes()

Activates the preview node rendering layer — shows nodes as they would appear in a preview/proofing context.

Source: FontLab Proteus API documentation

addTextBlock

addTextBlock(arg0: flTextBlock) -> Any

addTextBlock(flTextBlock)

Adds a text block to the canvas.

Source: FontLab Proteus API documentation

addedToCanvas

addedToCanvas(arg0: flCanvas) -> None

void addedToCanvas(flCanvas)

addedToWorkspace

addedToWorkspace(arg0: flWorkspace) -> Any

addedToWorkspace(flWorkspace)

Called when this canvas is added to the workspace. Not usually called directly from scripts.

Source: FontLab Proteus API documentation

adjustCanvasPosition

adjustCanvasPosition(arg0: QPointF) -> QPointF

QPointF adjustCanvasPosition(QPointF)

adjustPosition

adjustPosition(double: Any) -> Any

QPointF | double adjustPosition(QPointF | double)

appendDecorator

appendDecorator(arg0: flVisualItem, DecoratorOrder: Any) -> None

void appendDecorator(flVisualItem, DecoratorOrder)

appendPythonPainter

appendPythonPainter(callback: Any, order: Any = ...) -> Any

appendPythonPainter(callback, order=UnderOwner) -> token. callback(painter, canvas) draws in viewport coordinates; painter is valid only during the callback.

availableRect

availableRect() -> QRectF

QRectF availableRect()

Returns the canvas rectangle that's available for drawing.

Source: FontLab Proteus API documentation

boundingRectOnCanvas

boundingRectOnCanvas(*args: Any, **kwargs: Any) -> Any

QRectF boundingRectOnCanvas(

canvas

canvas() -> flCanvas

flCanvas canvas()

clearDecorators

clearDecorators() -> Any

clearDecorators()

clearItems

clearItems() -> Any

clearItems()

clearSurfaces

clearSurfaces() -> Any

clearSurfaces()

Clears all render surfaces (the internal caches FontLab uses for fast drawing).

Source: FontLab Proteus API documentation

clearTextBlocks

clearTextBlocks() -> Any

clearTextBlocks()

Removes all text blocks from this canvas.

Source: FontLab Proteus API documentation

collectChangedRects

collectChangedRects() -> Any

collectChangedRects()

Gathers the dirty regions that need redrawing — used internally by the rendering pipeline.

Source: FontLab Proteus API documentation

contain

contain(canvas_pos: QPointF) -> bool

bool contain(QPointF canvas_pos)

containsItem

containsItem(arg0: flVisualItem) -> bool

bool containsItem(flVisualItem)

createFrame

createFrame(list: fgSymbolList, position: QPointF) -> fgSymbolList

fgSymbolList createFrame(fgSymbolList list, QPointF position)

Creates a text frame at the given canvas position.

Source: FontLab Proteus API documentation

createInstance

createInstance() -> flCanvas

flCanvas createInstance()

Creates a new canvas instance.

Source: FontLab Proteus API documentation

deactivateEditor

deactivateEditor() -> Any

deactivateEditor()

deactivatePreviewNodes

deactivatePreviewNodes() -> Any

deactivatePreviewNodes()

Deactivates the preview node layer, returning to normal node rendering.

Source: FontLab Proteus API documentation

distanceTo

distanceTo(arg0: QPointF) -> float

double distanceTo(QPointF)

ensureVisible

ensureVisible(total_cover: Any = ...) -> Any

ensureVisible(QPointF | QRectF canvas_rect[, bool total_cover = true])

Scrolls and/or zooms the canvas to make the given point or rectangle visible. Set total_cover=True to ensure the entire rect fits within the viewport.

Source: FontLab Proteus API documentation

getHighlight

getHighlight() -> Any

QRectF/Nothing getHighlight()

Returns the current highlight rectangle, or None if no highlight is active.

Source: FontLab Proteus API documentation

getScaleTo

getScaleTo(arg0: flShapeInfo) -> float

double getScaleTo(flShapeInfo)

Calculates what zoom scale would be needed to fit a given shape in the current viewport.

Source: FontLab Proteus API documentation

haveCanvas

haveCanvas() -> bool

bool haveCanvas()

haveEditor

haveEditor(canvas_pos: QPointF) -> bool

bool haveEditor(QPointF canvas_pos)

haveHoveredItem

haveHoveredItem() -> bool

bool haveHoveredItem()

Returns True if the mouse cursor is hovering over an interactive item.

Source: FontLab Proteus API documentation

haveSelectedNodes

haveSelectedNodes() -> bool

bool haveSelectedNodes()

Returns True if any nodes are currently selected.

Source: FontLab Proteus API documentation

hide

hide() -> Any

hide()