70002637 Support draw edges with specific EdgeColor for polyfaces and solid polygons

Article 70002637
Type Wish
Product WebJS
Version 1103
Date Added 2/24/2025 12:00:00 AM
Fixed 11.4.1 (2/24/2025 12:00:00 AM)
Submitted by efstathios tsoumas

Summary

Support draw edges with specific EdgeColor for polyfaces and solid polygons

Solution

in version 11.4.1 new RenderModes was added

vdConst.RENDERMODE_SHADE_ON : same as vdConst.RENDERMODE_SHADE with draw edge lines around solid fill regions using vdcanvas.GetDocument().GlobalRenderProperties.EdgeColor as R,G,B,A array
vdConst.RENDERMODE_HIDE : same as vdConst.RENDERMODE_SHADE_ON with draw solid filled regions using the Background color
vdConst.RENDERMODE_RENDER_ON : same as vdConst.RENDERMODE_RENDER with draw edge lines around solid fill regions using vdcanvas.GetDocument().GlobalRenderProperties.EdgeColor as R,G,B,A array
Edges are draw only if vdrawObj.WebGLisActive is true see vdrawObj.EnableWebGL
Edge lines are draw using 1 pixel width
NOTE: 3d render modes are supported only for document Model layout and viewports.Other layouts always dispaly in wire 2d render mode


Example :

vdcanvas.GetDocument().GlobalRenderProperties.EdgeColor = [255,0,0,255]; //draw red edges
vdcanvas.SetRenderMode(vdConst.RENDERMODE_SHADE_ON);
-or-
vdcanvas.SetRenderMode(vdConst.RENDERMODE_RENDER_ON);
-or-
vdcanvas.SetRenderMode(vdConst.RENDERMODE_HIDE);

Send comments on this topic.