Skip to main content

Entity Data Types

These interfaces describe the data returned by createdEntityData and editedEntityData when the user creates or edits an entity in the display.

Each object carries a type discriminator (a Ve.EVisionElement value) so you can narrow the type before reading its properties.


IEntityData_Point2d

PropertyTypeDescription
xnumberX position in image coordinates
ynumberY position in image coordinates
colorstringCSS color string
opacitynumberOpacity from 0 to 1
markerVe.EMarkerTypeMarker shape
markerSizenumberMarker size in pixels

IEntityData_Rect2d

PropertyTypeDescription
centerXnumberCenter X in image coordinates
centerYnumberCenter Y in image coordinates
widthnumberWidth in pixels
heightnumberHeight in pixels
anglenumberRotation angle in degrees
descriptionstringOptional text label
lineWidthnumberStroke width
lineColorstringCSS stroke color
lineOpacitynumberStroke opacity from 0 to 1
lineStyleVe.ELineStyleStroke dash style
filledbooleanWhether the shape is filled
fillColorstringCSS fill color
fillOpacitynumberFill opacity from 0 to 1

IEntityData_Segment2d

PropertyTypeDescription
x1numberStart X in image coordinates
y1numberStart Y in image coordinates
x2numberEnd X in image coordinates
y2numberEnd Y in image coordinates
lineWidthnumberStroke width
lineColorstringCSS stroke color
lineOpacitynumberStroke opacity from 0 to 1
lineStyleVe.ELineStyleStroke dash style
capSize1numberSize of the start cap
cap1Ve.ECapTypeShape of the start cap
capSize2numberSize of the end cap
cap2Ve.ECapTypeShape of the end cap

IEntityData_Line2d

PropertyTypeDescription
originXnumberStart X in image coordinates
originYnumberStart Y in image coordinates
endXnumberEnd X in image coordinates
endYnumberEnd Y in image coordinates
lineWidthnumberStroke width
lineColorstringCSS stroke color
lineOpacitynumberStroke opacity from 0 to 1
lineStyleVe.ELineStyleStroke dash style

IEntityData_Circle2d

PropertyTypeDescription
centerXnumberCenter X in image coordinates
centerYnumberCenter Y in image coordinates
radiusnumberRadius in pixels
lineWidthnumberStroke width
lineColorstringCSS stroke color
lineOpacitynumberStroke opacity from 0 to 1
lineStyleVe.ELineStyleStroke dash style
filledbooleanWhether the shape is filled
fillColorstringCSS fill color
fillOpacitynumberFill opacity from 0 to 1

IEntityData_Ellipse2d

PropertyTypeDescription
centerXnumberCenter X in image coordinates
centerYnumberCenter Y in image coordinates
radiusAnumberSemi-major axis in pixels
radiusBnumberSemi-minor axis in pixels
anglenumberRotation angle in degrees
lineWidthnumberStroke width
lineColorstringCSS stroke color
lineOpacitynumberStroke opacity from 0 to 1
lineStyleVe.ELineStyleStroke dash style
filledbooleanWhether the shape is filled
fillColorstringCSS fill color
fillOpacitynumberFill opacity from 0 to 1

IEntityData_Path2d

PropertyTypeDescription
points{ x: number; y: number }[]Ordered list of path points in image coordinates
closedbooleanWhether the path is closed (last point connects to first)
lineWidthnumberStroke width
lineColorstringCSS stroke color
lineOpacitynumberStroke opacity from 0 to 1
lineStyleVe.ELineStyleStroke dash style
filledbooleanWhether the shape is filled
fillColorstringCSS fill color
fillOpacitynumberFill opacity from 0 to 1

IEntityData_Shape2d

PropertyTypeDescription
points{ x: number; y: number }[][]Array of contours (outer boundary + holes) in image coordinates
lineWidthnumberStroke width
lineColorstringCSS stroke color
lineOpacitynumberStroke opacity from 0 to 1
lineStyleVe.ELineStyleStroke dash style
filledbooleanWhether the shape is filled
fillColorstringCSS fill color
fillOpacitynumberFill opacity from 0 to 1

IEntityData_AnchorString

Text anchored to a single point in image coordinates.

PropertyTypeDescription
valuestringThe text content
colorstringCSS text color
opacitynumberOpacity from 0 to 1
fontSizenumberFont size in pixels
originXnumberAnchor X in image coordinates
originYnumberAnchor Y in image coordinates
anglenumberRotation angle in degrees
hAlignment"LEFT" \| "CENTER" \| "RIGHT"Horizontal alignment relative to anchor
vAlignment"TOP" \| "CENTER" \| "BOTTOM"Vertical alignment relative to anchor

IEntityData_FrameString

Text fitted inside a rectangular frame in image coordinates.

PropertyTypeDescription
valuestringThe text content
colorstringCSS text color
opacitynumberOpacity from 0 to 1
fontSizenumberFont size in pixels
frameWidthnumberFrame width in pixels
frameHeightnumberFrame height in pixels
frameCenterXnumberFrame center X in image coordinates
frameCenterYnumberFrame center Y in image coordinates
hAlignment"LEFT" \| "CENTER" \| "RIGHT"Horizontal alignment within the frame
vAlignment"TOP" \| "CENTER" \| "BOTTOM"Vertical alignment within the frame