Class

Gjsgjs/cairodefaultSurfaceAbstract

Base class for all Cairo surfaces

Hierarchy (View Summary)

Index

Constructors

Methods

  • Finishes the surface and drops all references to external resources

    Returns void

  • Performs all pending drawing operations

    Returns void

  • Returns user data attached to the surface (C API: cairo_surface_get_user_data)

    Parameters

    Returns unknown

    The attached data or null

  • Gets the device offset of the surface

    Returns [number, number]

    An array with [x, y] device offset

  • Gets the device scale of the surface

    Returns [number, number]

    An array with [x, y] device scale

  • Attaches user data to the surface (C API: cairo_surface_set_user_data)

    Parameters

    • key: UserDataKey

      Key for the user data

    • userData: unknown

      Data to attach

    • Optionaldestroy: (data: unknown) => void

      Optional callback when the surface is destroyed or data is replaced

    Returns Status

  • Sets the device offset of the surface

    Parameters

    • x: number

      X offset

    • y: number

      Y offset

    Returns void

  • Sets the device scale of the surface

    Parameters

    • x: number

      X scale factor

    • y: number

      Y scale factor

    Returns void