Dual coordinate systems

This picture illustrates the different coordinate systems that Monkeybone is using. Both lines are drawn from 0, 0 to 30, 30. The yellow line is drawn using the coordinate system of the image itself, and the green line is drawn using the coordinate system of the diagram.

The syntax is the same for DiagramLine and Line, the coordinate system is the only difference. This means that you can choose to use named arguments or points encapsulated by parenthesis. This is the source for the above image:

//Set size and background color.
Clear 320x200 #667788

//Just to make it more visible, set line thikness to 3 pixels.
Set Line Thikness To 3

//Create a diagram.
Diagram #8899aa X:20 Y:20 W:280 H:160

//Draw a yellow line on the image from 0,0 to 30,30.
Line #ffff00 (0,0) (30,30)

//Draw a green line on the diagram from 0,0 to 30,30.
DiagramLine #00ff00 (0,0) (30,30)

Note: A line can be anything from one to 1000 pixels wide.

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll:

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!

Comments

Important information: If you have not commented before, your comment will be reviewed before it is published. This means that you will not see it immediately, but I have received it. This is not because I want to filter comments, but because I want to prevent spam and advertising.

Leave a Reply

Your email address will not be published. Required fields are marked *