Drawing different shapes with Imagemagick
Posted: 2019-06-08T18:27:28-07:00
Hello everyone,
I am new to ImageMagick and am working on Rubyplot, an advanced plotting library for Ruby. I am adding ImageMagick as a backend for this library using rmagick.
I have to create a function which takes x and y coordinate as input and draws the shapes pentagon, hexagon, heptagon, octagon, stars (with the number of sides as 4/5/6/7/8). To do this polyline can be used but that would involve too much geometry as I would have to use points relative to x and y.
Is there any other way of doing this? Please suggest.
Thank you in advance!
I am new to ImageMagick and am working on Rubyplot, an advanced plotting library for Ruby. I am adding ImageMagick as a backend for this library using rmagick.
I have to create a function which takes x and y coordinate as input and draws the shapes pentagon, hexagon, heptagon, octagon, stars (with the number of sides as 4/5/6/7/8). To do this polyline can be used but that would involve too much geometry as I would have to use points relative to x and y.
Is there any other way of doing this? Please suggest.
Thank you in advance!