Add DisplayAnchors and Scissor support to DisplayItem#18
Draft
Copilot wants to merge 1 commit into
Draft
Conversation
- Added GetAnchors() method to ScriptDisplayItem that projects the 3D bounding box into 2D screen space and returns 9 anchor points - Added scissor rect storage to DisplayItem (HasScissor, SetScissor, ClearScissor, GetScissorRect) - Updated ScriptDisplayItem::Draw() to capture active scissor state from DisplayArea - Updated Renderer::DrawObjectIn3DSpace() to apply/reset scissor rect - Updated DisplayArea AddItem docs to mention DisplayItem support
Copilot created this pull request from a session on behalf of
TrainWrack
May 26, 2026 19:17
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
CHANGELOG.mdfile on the branch/fork (if it is an internal change, this is not needed).Links to issue(s) this pull request concerns (if applicable)
#14
Pull request description
Extends
DisplayItem(3D model display objects) withGetAnchors()and scissor clipping so they integrate withDisplayAreathe same wayDisplaySpriteandDisplayStringalready do.Changes
GetAnchors()for DisplayItem — Projects the 3D bounding box into 2D screen space and returns 9 anchor points (corners, edge midpoints, center) in percent coordinates, matching the API of DisplaySprite/DisplayString.DisplayItemnow stores a scissor rect.ScriptDisplayItem::Draw()captures the active scissor state set byDisplayArea, andRenderer::DrawObjectIn3DSpace()applies/resets it per item.GetAnchorsbound under the existingScriptReserved_DisplayStringGetAnchorskey.Usage