Skip to content

ISVGObject

Base interface for all elements that have a user matrix and/or have bounds.

Unit: BVE.SVG2Intf ยท Extends: ISVGElement

Methods

BufferInvalidate

procedure BufferInvalidate;

Drops the persistent buffer of this element and of every element rendering it, so the next render draws them again.

Note

Only has an effect under sroPersistentBuffers. An element whose content changed is not enough on its own: the elements above it composited it into their own buffers, and those would otherwise be re-applied unchanged. The walk goes up the render tree rather than the document, because a referenced element - the target of a use, a gradient, a marker - is rendered somewhere other than where it is declared.

CalcBBox

function CalcBBox(
  aRoot: ISVGRoot;
  const aBoundsInclusion: TSVGBoundsInclusionSet): TSVGRect;

Calculates the Bounding box in user coordinates of the element

CalcBBoxCTM

function CalcBBoxCTM(
  aRoot: ISVGRoot;
  const aBoundsInclusion: TSVGBoundsInclusionSet): TSVGRect;

CalcBBoxCTM calculates the bounding box of the element transformed by the current transformation matrix.

CalcBBoxCTMClipped

function CalcBBoxCTMClipped(
  aRoot: ISVGRoot;
  const aBoundsInclusion: TSVGBoundsInclusionSet): TSVGRect;

CalcBBoxCTMClipped takes the result of CalcBBoxCTM and calculates the resulting bounding box after clipping

CalcBBoxScreen

function CalcBBoxScreen(
  aRoot: ISVGRoot;
  aParentCache: ISVGObjectCache;
  const aBoundsInclusion: TSVGBoundsInclusionSet): TSVGRect;

CalcBBoxScreen calculates the absolute axis aligned bounding box of the element including it's child elements in screen coords. Elements that are not rendered directly return RectUndefined.

CalcBBoxScreenIndirect

function CalcBBoxScreenIndirect(
  aRoot: ISVGRoot;
  aParentCache: ISVGObjectCache;
  const aBoundsInclusion: TSVGBoundsInclusionSet): TSVGRect;

CalcBBoxScreenIndirect updates the current transformation matrix and evalutes if the element should be visible according to its style settings. If visible it then calls CalcBBoxCTMClipped, else it returns RectFUndefined.

CalcChildrenSize

function CalcChildrenSize(aRoot: ISVGRoot): TSVGRect;

Calculates the combined size of the elements children

CalcContentMatrix

function CalcContentMatrix(aRoot: ISVGRoot): TSVGMatrix;

Calculates the matrix that is to be applied to the objects children

CalcSizeScreen

function CalcSizeScreen(
  aRoot: ISVGRoot;
  aParentCache: ISVGObjectCache): TSVGRect;

CalcSizeScreen calculates the size of the element including it's child elements in screen coords. Elements that are not rendered directly return RectUndefined.

CalcSizeScreenIndirect

function CalcSizeScreenIndirect(
  aRoot: ISVGRoot;
  aParentCache: ISVGObjectCache): TSVGRect;

CalcSizeScreenIndirect updates the current transformation matrix and evalutes if the element should be visible according to its style settings. If visible it then calls CalcSizeCTMClipped, else it returns RectFUndefined.

CalcUserMatrix

function CalcUserMatrix(aRoot: ISVGRoot): TSVGMatrix; overload;

Calculates the user matrix from the transform attribute

CalcViewPort

function CalcViewPort(aRoot: ISVGRoot): TSVGRect;

No description yet.

EventCapture

procedure EventCapture(aRoot: ISVGRoot; aParentCache: ISVGObjectCache);

No description yet.

EventCaptureIndirect

procedure EventCaptureIndirect(
  aRoot: ISVGRoot;
  aParentCache: ISVGObjectCache);

No description yet.

GetBuffer

function GetBuffer: ISVGRenderBuffer;

No description yet.

GetCacheList

function GetCacheList: TList<ISVGObjectCache>;

No description yet.

GetClipping

function GetClipping(aRoot: ISVGRoot): boolean;

No description yet.

GetCurCache

function GetCurCache: ISVGObjectCache;

No description yet.

GetHasBuffer

function GetHasBuffer(aRoot: ISVGRoot): boolean;

No description yet.

GetHitTest

function GetHitTest: Boolean;

No description yet.

GetIsRendered

function GetIsRendered(aRoot: ISVGRoot): boolean;

No description yet.

GetTransform

function GetTransform: TSVGTransformList;

No description yet.

InitBuffers

procedure InitBuffers;

No description yet.

ObjectAtPt

function ObjectAtPt(
  aRoot: ISVGRoot;
  aParentCache: ISVGObjectCache;
  const aPt: TSVGPoint;
  const aIfHitTest: Boolean): ISVGObject;

No description yet.

ObjectAtPtIndirect

function ObjectAtPtIndirect(
  aRoot: ISVGRoot;
  aParentCache: ISVGObjectCache;
  const aPt: TSVGPoint;
  const aIfHitTest: Boolean): ISVGObject;

No description yet.

ObjectCacheClear

procedure ObjectCacheClear(aParentCache: ISVGObjectCache);

ObjectCacheClear clears the cache that references the supplied aParentCache.

ObjectCacheInvalidate

procedure ObjectCacheInvalidate(aParentCache: ISVGObjectCache);

Invalidate the cache

Paint

procedure Paint(
  aRoot: ISVGRoot;
  const aBuffered: Boolean;
  aParentCache: ISVGObjectCache);

Paint paints the element if it can be rendered directly (not div, clipPath, mask, etc), it then calls PaintIndirect

PaintChildren

procedure PaintChildren(aRoot: ISVGRoot; const aBuffered: Boolean);

PaintChildren calls Paint on the elements children

PaintContent

procedure PaintContent(aRoot: ISVGRoot; const aBuffered: Boolean);

PaintContent paints the element content

PaintElement

procedure PaintElement(aRoot: ISVGRoot; const aBuffered: Boolean);

No description yet.

PaintIndirect

procedure PaintIndirect(
  aRoot: ISVGRoot;
  const aBuffered: Boolean;
  aParentCache: ISVGObjectCache);

PaintIndirect paints the element unless conditional attributes prevent painting. It applies the element style and user matrix and calls PaintClipped.

PaintTestRect

procedure PaintTestRect(
  aRoot: ISVGRoot;
  const aRect: TSVGRect;
  const aColor: TSVGColor);

PaintTestRect paints a test rectangle to check bounds

PointInFill

function PointInFill(aRoot: ISVGRoot; const aPt: TSVGPoint): boolean;

PointInFill returns True if the point aPt is in the fill of the element

PointInOutline

function PointInOutline(aRoot: ISVGRoot; const aPt: TSVGPoint): boolean;

No description yet.

PointInStroke

function PointInStroke(aRoot: ISVGRoot; const aPt: TSVGPoint): boolean;

PointInFill returns True if the point aPt is in the stroke of the element

SetHitTest

procedure SetHitTest(const aValue: boolean);

No description yet.

SetTransform

procedure SetTransform(const aValue: TSVGTransformList);

No description yet.

UpdateCTM

procedure UpdateCTM(aRoot: ISVGRoot);

No description yet.

UpdateCTMContent

procedure UpdateCTMContent(aRoot: ISVGRoot);

No description yet.

UpdateViewport

procedure UpdateViewport(aRoot: ISVGRoot);

Calculates and sets the nieuw viewport from the current viewport settings and the current style attributes

Properties

Buffer

property Buffer: ISVGRenderBuffer read GetBuffer;

No description yet.

CacheList

property CacheList: TList<ISVGObjectCache> read GetCacheList;

No description yet.

CurCache

property CurCache: ISVGObjectCache read GetCurCache;

No description yet.

HitTest

property HitTest: Boolean read GetHitTest write SetHitTest;

No description yet.

Transform

property Transform: TSVGTransformList read GetTransform write SetTransform;

No description yet.