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).

1  
sclass RegionBoundingBoxPainter > RegionPainter {
2  
  settable int lineWidth = 3;
3  
4  
  void drawRegion {
5  
    Rect r = bounds();
6  
    g.setColor(withOpacity(.75, Color.red));
7  
    temp tempSetStroke(g, new BasicStroke(lineWidth));
8  
    drawRect(g, growRectTopAndLeft(scaleRect_floor(growRectRightAndBottom(r), zoomX, zoomY)));
9  
  }
10  
}

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: 175 / 291
Version history: 9 change(s)
Referenced in: [show references]