The Document instance represented by this object
Internal_Internal_The registered keydown listener.
Internal_The pending text.
Internal_The preview type, if any.
A control icon for interacting with the object
The shape controls of this Drawing.
A reference to the Scene embedded Document instance which this object represents
The border frame and resizing handles for the drawing.
A mouse interaction manager instance which handles mouse workflows related to this object.
Status flags which are applied at render-time to update the PlaceableObject. If an object defines RenderFlags, it should at least include flags for "redraw" and "refresh".
Retain a reference to the Scene within which this Placeable Object resides
The drawing shape which is rendered as a PIXI.Graphics in the interface or a PrimaryGraphics in the Primary Group.
A text label that may be displayed as part of the interface layer for the Drawing.
The texture that is used to fill this Drawing, if any.
Protected_The dashed measurement line style.
Protected_The measurement labels.
Protected_The measurement lines.
Protected_The solid measurement line style.
StaticembeddedStaticFREEHAND_The rate at which points are sampled (in milliseconds) during a freehand drawing workflow
StaticRENDER_The ticker priority when RenderFlags of this class are handled. Valid values are OBJECTS or PERCEPTION.
StaticRENDER_StaticSHAPE_A convenience reference to the possible shape types.
The object that this object is a preview of if this object is a preview.
An indicator for whether the object is currently controlled
Is the HUD display active for this Placeable?
Does there exist a temporary preview of this placeable object?
Does the Drawing have text that is displayed?
An indicator for whether the object is currently a hover target
The controls handle that is currently hovered, if any.
The id of the corresponding Document which this PlaceableObject represents.
The mouse interaction state of this placeable.
A convenient reference for whether the current User is the author of the Drawing document.
A convenient reference for whether the current User has full control over the document.
A Boolean flag for whether the Drawing is a Polygon type (either linear or freehand)?
Is this placeable object a temporary preview?
A Boolean flag for whether the Drawing utilizes a tiled texture background?
Is this placeable currently visible?
Provide a reference to the CanvasLayer which contains this PlaceableObject.
A unique identifier which is used to uniquely identify elements on the canvas related to this object.
The preview type, if any.
A document sheet used to configure the properties of this Placeable Object or the Document it represents.
The named identified for the source object associated with this PlaceableObject. This differs from the objectId because the sourceId is the same for preview objects as for the original.
The shape type that this Drawing represents. A value in Drawing.SHAPE_TYPES.
StaticimplementationReturn a reference to the configured subclass of this base PlaceableObject type.
InternalObtain a shifted position for the Placeable Object.
The number of grid units to shift along the X-axis
The number of grid units to shift along the Y-axis
The number of grid units to shift along the Z-axis
The shifted target coordinates
InternalExecute a partial draw.
The draw function
The drawn object
InternalGet the data of the copied object pasted at the position given by the offset. Called by foundry.canvas.layers.PlaceablesLayer#pasteObjects for each copied object.
The offset relative from the current position to the destination
Optionaloptions: { cut?: boolean; hidden?: boolean; snap?: boolean } = {}Optionalcut?: booleanIs cut operation?
Optionalhidden?: booleanPaste in a hidden state, if applicable. Default is false.
Optionalsnap?: booleanSnap to the grid. Default is true.
The create or update data
InternalUpdate the quadtree.
InternalDetermine a new angle of rotation for a PlaceableObject either from an explicit angle or from a delta offset.
An object which defines the rotation update parameters
Optionalangle?: numberAn explicit angle, either this or delta must be provided
Optionaldelta?: numberA relative angle delta, either this or the angle must be provided
Optionalsnap?: numberA precision (in degrees) to which the resulting angle should snap. Default is 0.
The new rotation angle for the object
Activate interactivity for the Placeable Object
Assume control over a PlaceableObject, flagging it as controlled and enabling downstream behaviors
Optionaloptions: {Additional options which modify the control request
Optionalforce?: booleanControl the object even if it is not interactable?
OptionalisNew?: booleanWas this object just created?
OptionalreleaseOthers?: booleanRelease any other controlled objects first
OptionalrenderSidebar?: booleanRe-render the sidebar.
A flag denoting whether control was successful
Draw the placeable object into its parent container
Optionaloptions: object = {}Options which may modify the draw and refresh workflow
The drawn object
Enable text editing for this drawing.
Optionaloptions: object = {}Get the snapped position for a given position or the current position.
Optionalposition: anyThe position to be used instead of the current position
The snapped position
Refresh all incremental render flags for the PlaceableObject. This method is no longer used by the core software but provided for backwards compatibility.
Optionaloptions: object = {}Options which may modify the refresh workflow
The refreshed object
Release control over a PlaceableObject, removing it from the controlled set
Options which modify the releasing workflow
OptionalrenderSidebar?: booleanRe-render the sidebar.
A Boolean flag confirming the object was released.
Rotate the PlaceableObject to a certain angle of facing
The desired angle of rotation
Snap the angle of rotation to a certain target degree increment
The rotated object
Protected_ProtectedDoes the User have permission to configure the Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedDoes the User have permission to control the Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedDoes the User have permission to create the underlying Document?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedDoes the User have permission to delete the underlying Document?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedDoes the User have permission to drag this Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedDoes the User have permission to hover on this Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: Event | FederatedEvent<UIEvent | PixiTouch>The DOM interaction event or pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedCan the User access the HUD for this Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedDoes the User have permission to update the underlying Document?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedDoes the User have permission to view details of the Placeable Object?
The User performing the action. Always equal to game.user.
Optionalevent: FederatedEvent<UIEvent | PixiTouch>The pointer event if this function was called by foundry.canvas.interaction.MouseInteractionManager.
Protected_ProtectedCreate a standard MouseInteractionManager for the PlaceableObject
Protected_ProtectedFinalize the right-drag operation.
The triggering mouse click event
Protected_ProtectedFormat a distance that is displayed in a measurement label.
The distance
The distance label
Protected_ProtectedGet the fill style used for drawing the shape of this Drawing.
The fill style options (PIXI.IFillStyleOptions).
Protected_ProtectedGet the line style used for drawing the shape of this Drawing.
The line style options (PIXI.ILineStyleOptions).
Protected_Protected_ProtectedDefine a PIXI TextStyle object which is used for the measurement labels.
Protected_ProtectedPrepare the text style used to instantiate a PIXI.Text or PreciseText instance for this Drawing document.
Protected_ProtectedInitialize the right-drag operation.
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a single right-click event to configure properties of the object
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a double right-click event to configure properties of the object
The triggering canvas interaction event
Protected_ProtectedRegister pending canvas operations which should occur after a new PlaceableObject of this type is created
Protected_ProtectedConclude a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Protected_ProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the cancellation is prevented
Protected_ProtectedCallback actions which occur on a right mouse-drag operation.
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a right mouse-drag operation.
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the start if prevented
Protected_ProtectedBegin a drag operation from the perspective of the preview clone. Modify the appearance of both the clone (this) and the original (_original) object.
Protected_ProtectedActions that should be taken for this Placeable Object when a mouseover event occurs. Hover events on PlaceableObject instances allow event propagation by default.
The triggering canvas or DOM interaction event
Optionaloptions: { hoverOutOthers?: boolean; updateLegend?: boolean } = {}Options which customize event handling
OptionalhoverOutOthers?: booleanTrigger hover-out behavior on sibling objects
OptionalupdateLegend?: booleanHighlight corresponding entry in the sidebar legend.
Protected_ProtectedActions that should be taken for this Placeable Object when a mouseout event occurs
The triggering canvas or DOM interaction event
Optionaloptions: { updateLegend?: boolean } = {}Options which customize event handling
OptionalupdateLegend?: booleanHighlight corresponding entry in the sidebar legend.
Protected_ProtectedCallback action which occurs on a long press.
The triggering canvas interaction event
The local canvas coordinates of the mousepress.
Protected_ProtectedCallback actions which occur on a single left-unclick event to assume control of the object
The triggering canvas interaction event
Protected_ProtectedCallback actions which occur on a single right-unclick event
The triggering canvas interaction event
Protected_ProtectedShould the placeable propagate left click downstream?
Protected_ProtectedShould the placeable propagate right click downstream?
Protected_ProtectedUpdate sorting of this Drawing relative to other PrimaryCanvasGroup siblings. Called when the elevation or sort order for the Drawing changes.
Protected_ProtectedRefresh the measurements.
Protected_ProtectedRefresh the position.
Protected_ProtectedRefresh the rotation.
Protected_ProtectedClear and then draw the shape.
Protected_ProtectedRefresh the content and appearance of text.
Protected#onProtectedCallback actions which occur on a right mouse-drag operation.
The triggering mouse click event
If false, the start if prevented
Static_InternalGet the origin used for pasting the copied objects.
The objects that are copied
The offset
Static_InternalObtain the shifted position.
The number of grid units to shift along the X-axis
The number of grid units to shift along the Y-axis
The number of grid units to shift along the Z-axis
The unsnapped position
The snapped position
The grid
The shifted target coordinates
StaticnormalizeAdjust the location, dimensions, and points of the Drawing before committing the change.
The DrawingData pending update
The adjusted data
StaticrescaleGet a vectorized rescaling transformation for drawing data and dimensions passed in parameter
The original drawing data
The pixel distance dragged in the horizontal direction
The pixel distance dragged in the vertical direction
The adjusted shape data
The Drawing object is an implementation of the PlaceableObject container. Each Drawing is a placeable object in the DrawingsLayer.
See