Forum archive 2000-2006

Michael Gage -

Michael Gage -

by Arnold Pizer -
Number of replies: 0 topic started 3/24/2003; 8:11:35 PM
last post 3/24/2003; 8:11:35 PM
userMichael Gage -  blueArrow
3/24/2003; 8:11:35 PM (reads: 566, responses: 0)
This is an example of doing very simple drawing using directly. More complicated constructions can be constructed by using the properties described in the file on CPAN.

The object created by

$graph = init_graph(-5,5,5,5);

has the GD object


as it's drawing canvas.





## A very simple drawing problem


DOCUMENT(); # This should be the first executable line in the problem.


$graph = init_graph(-5,-5,5,5,ticks=>[4,4],axes=>[0,0],pixels=>[400,400]);



# At the moment there is no easy way to change the weight of the lines being drawn. To do so one would want
# to incorporate some of the code in into itself. The code involves gdBrushed.
# Since GD has
# gone through many revisions since the code was written it may now be possible to write some of
# this code more efficiently.

ENDDOCUMENT(); # This should be the last executable line in the problem.

<| Post or View Comments |>