AggPas - Anti-Grain Geomertry for Object Pascal

TAgg2D.Attach (bitmap, flip_y): boolean

Description

This method associates a vector engine object with a bitmap image for the purpose of rendering vector graphics onto its surface.

Parameters

bitmap: TBitmap

A valid reference to a non-empty Device Independent Bitmap in pf24bit or pf32bit format. Bitmap can already contain some image data (e.g. photo). In that case all renderings will take place over the existing image data.

flip_y: boolean = false

Indicates if coordinate system on Y axis originates in Bottom Left corner. Otherwise coordinates on Y axis originate in Top Left corner.

Returns

If True, vector engine was successfully connected to the bitmap surface and drawing routine can be immediately performed.

If False, there was an error connecting to the surface. Check if bitmap image has required DIB format or if it's not empty.

Example

if VG.Attach(Image1.Picture.Bitmap) then begin

  // Drawing Routine ...

end;