Reference

Table of Contents  ▸  List of Commands  ▸  Image Drawing  ▸  polygon◀  polka_dots    |    quiver  ▶

polygon

Built-in command

Arguments:

Description:

Draw specified colored N-vertices polygon on selected images.

pattern is an hexadecimal number starting with 0x which can be omitted
even if a color is specified. If a pattern is specified, the polygon is
drawn outlined instead of filled.

Default values:

opacity=1, pattern=(undefined) and color1=0.

Examples of use:

• Example #1

$ gmic image.jpg polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,0.3,0,255,0 polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,1,0xCCCCCCCC,255

Command: image.jpg polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,0.3,0,255,0 polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,1,0xCCCCCCCC,255

• Example #2

$ gmic image.jpg 2,16,1,1,'u(if(x,{h},{w}))' polygon[-2] {h},{^},0.6,255,0,255 remove[-1]

Command: image.jpg 2,16,1,1,'u(if(x,{h},{w}))' polygon[-2] {h},{^},0.6,255,0,255 remove[-1]