Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1033855 // RegionBoundingBoxPainter

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5877L/33K).

sclass RegionBoundingBoxPainter > RegionPainter {
  settable int lineWidth = 3;

  void drawRegion {
    Rect r = bounds();
    g.setColor(withOpacity(.75, Color.red));
    temp tempSetStroke(g, new BasicStroke(lineWidth));
    drawRect(g, growRectTopAndLeft(scaleRect_floor(growRectRightAndBottom(r), zoomX, zoomY)));
  }
}

Author comment

Began life as a copy of #1033812

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033855
Snippet name: RegionBoundingBoxPainter
Eternal ID of this version: #1033855/10
Text MD5: fae19f0bf5da4e0d1bc46a5033c318f1
Transpilation MD5: 115b59ac9753dfdea979094ba52b8d25
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-15 17:50:11
Source code size: 333 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 173 / 287
Version history: 9 change(s)
Referenced in: [show references]