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

16
LINES

< > BotCompany Repo | #1034037 // g22_highlightRegion

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

Libraryless. Click here for Pure Java version (22620L/142K).

1  
svoid g22_highlightRegion(int[] pixels, ImageSurface is, Gazelle22_ImageToRegions itr,
2  
  Pt mouse default is.mousePosition, bool showRegionsAsOutline) {
3  
  if (mouse != null && itr != null && itr.regions != null) {
4  
    int iHighlightedRegion = itr.regions.regionAt(mouse);
5  
    g22_highlightRegion(pixels, itr, iHighlightedRegion, showRegionsAsOutline);
6  
  }
7  
}
8  
9  
svoid g22_highlightRegion(int[] pixels, Gazelle22_ImageToRegions itr, int iRegion, int color default 0xFF00C000, bool showRegionsAsOutline) {
10  
  if (iRegion == 0) ret;
11  
  if (showRegionsAsOutline) {
12  
    RegionBorder_innerPoints x = new(itr.regions, iRegion);
13  
    gazelle22_highlightRegionOutline(pixels, itr, x);
14  
  } else
15  
    itr.regions.markRegionInPixelArray(pixels, iRegion, color);
16  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034037
Snippet name: g22_highlightRegion
Eternal ID of this version: #1034037/8
Text MD5: f6f9cfbacca14097c375ee6ba02b4e12
Transpilation MD5: 90f8acdbb4e9786c4407a80ab791dbf7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-16 18:05:14
Source code size: 761 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 332
Version history: 7 change(s)
Referenced in: [show references]