Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Poly2 - Fill & Outline combined

GDL Enthusiast
Newcomer
Hi GDL Experts,

A simple question, is it possible to write both the fill and the outline in the same code shape syntax?

Currently I write two pieces of Syntax, one for the fill and one for the outline:

!=== Fill Syntax
pen 1
SET FILL "Solid"
POLY2_ 5,7,
0,0,1,
A,0,1,
A,B,1,
0,B,1,
0,0,-1

!=== Outline Syntax
pen 1
LINE2 0,0,A,0
LINE2 A,0,A,B
LINE2 A,B,0,B
LINE2 0,B,0,0

Is there a way to combine them so that I don't double up the code?

Many thanks in advance!
2 REPLIES 2

runxel
Mentor
Use POLY2_B.
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Podolsky
Newcomer
Any POLY2, POLY2_, POLY2_A, POLY2_B etc have second parameter, that defines presence of fill and outline. This parameter can be written as 1+2+4 where 1 means draw contour, 2 - draw fill, 4 - close an open polygon.
In your case you have chosen 7 - so it works. If you want to use different pens for fill and outline, use POLY2_A, POLY2_B or POLY2_B{2}.
For more details refer to GDL user manual.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!