multiple polygons on 1 image

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    multiple polygons on 1 image

    i am using the imagepolygon function to create a shape on an image i have,
    however i want to put more than just one polygon onto this image, i have no
    idea how to do this. Do i have to call the imageploygon function each time i
    want to add something to the image? All help is appreciated.

    Thanks Dave



  • Pedro Graca

    #2
    Re: multiple polygons on 1 image

    David wrote:[color=blue]
    > i am using the imagepolygon function to create a shape on an image i have,
    > however i want to put more than just one polygon onto this image, i have no
    > idea how to do this. Do i have to call the imageploygon function each time i
    > want to add something to the image? All help is appreciated.[/color]

    What have you tried?
    What happenned? What did you want to happen?

    NOT TESTED
    <?php
    $polygons = array();
    $polygons[] = get_polygon('on e');
    $polygons[] = get_polygon('tw o');
    $polygons[] = get_polygon('th ree');
    $polygons[] = get_polygon('fo ur');
    // set up $image
    foreach ($polygons as $poly) {
    imagepolygon($i mage, $poly, count($poly)/2, $colour);
    }
    // send $image to browser
    ?>
    --
    --= my mail box only accepts =--
    --= Content-Type: text/plain =--
    --= Size below 10001 bytes =--

    Comment

    Working...