Filling in Graphics 
Author Message
 Filling in Graphics

    I've been working with the idea of a Pie Chart, and was wondering
what would be the best way to fill in various areas of the Pie with
different colors. I normally don't do much with graphics, and this has
me a little confused. The Basic (No Pun Inteneded) graphics that I have
so far look something like;

CONST Pi = 3.1416

SCREEN 12

CIRCLE (320, 240), 200, 11, 0  '  Draw Circle

'
COLOR 14
LINE (320, 240)-(217, 67)    ' Draw First Line

COLOR 4
LINE (320, 240)-(518, 240)   ' Draw Next

COLOR 10
LINE (320, 240)-(191, 394)  ' Draw next

COLOR 4
LOCATE 10, 39
PRINT "Corporate 33% "

COLOR 15
LOCATE 15, 19
PRINT "Moulding Plants 32%  "

COLOR 10
LOCATE 20, 39
PRINT "Other Sawmills 35% "

'paint      ' How to Fill In the Graph?
'draw

    I've tried to get a feel for paint, and that hasn't worked. Short of
coloring individual Pixels how can I fill in the various areas, with
different colors. Thanks for any help you can give me on this.

                  [ Pat Pridgen - La Grande, Oregon ]

*SignIt 2.0 #001*
---
 t SPEED 2.00 #2289 t  A programmer is a twisted poet.

-----------------------------------------------------------------------------

This message was processed by Software Valley Information System
-----------------------------------------------------------------------------



Wed, 07 Jul 1999 03:00:00 GMT  
 Filling in Graphics


writes:

Quote:
>    I've been working with the idea of a Pie Chart, and was wondering
>what would be the best way to fill in various areas of the Pie with
>different colors. I normally don't do much with graphics, and this has
>me a little confused.

PAINT is relatively straight forward to use, just make sure that
the lines making up your object are all the same colour, they
are joined together and there are no "gaps" in them.

Try your modified code -

CONST Pi = 3.1416
SCREEN 12

CIRCLE (320, 240), 200, 11, 0  '  Draw Circle

  'draw the segment with the same colour so we can
  'PAINT it
COLOR 11   '14
LINE (320, 240)-(217, 67)    ' Draw First Line
COLOR 11    '4
LINE (320, 240)-(519, 240)   ' Draw Next

  'fill in top right segment with green
PAINT (319, 229), 2, 11

TTfn,

Craig Wright___



Fri, 09 Jul 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to fill a graphic zone using a pattern?

2. graphic fill help

3. Graphics flood-fill method

4. Graphics - filled Shapes

5. Paint and fill graphics with VB

6. Paint and Fill graphics in VB

7. Button for filling a fill-In field ? (Newbie)

8. Button for filling a fill-In field ? (Newbie)

9. Button for filling a fill In field ? (Newbie)

10. graphics filter to convert array(x,y) to standard graphics

11. Saving graphics objects to an standard graphics file

12. Graphic example - 'smart' connected graphic objects

 

 
Powered by phpBB® Forum Software