At 09:21 2002-10-10 -0400, Jonathan Southwick wrote:

Where can I get information on how to use this? I am able to draw lines (axes and ticks for a graph) and I know how to plot individual points on the "graph" but I am wondering if there is more? (I don't mean circles and boxes.)

http://216.26.168.92/vbapi/ref/funcc.html#devices

Look around. Look up stuff you already know.


Can the DC object be cleared (other than placing another window over it and removing the window)?

You can draw a filled rectangle that covers the entire area. Calling InvalidateRect() will also force the window to be repainted (see below).


I still haven't figured out how to handle keep what I have drawn to the object there when another window covers it.

Ok. Say you have a routine that draws the entire graph to a Win32::GUI::Graphics control (let's name it "gfxGraph). Let's call the sub drawGraph.

What you need to do is to call drawGraph() from within the Paint event handler, like so:

sub gfxGraph_Paint {
    drawGraph();
    return(1);
}

Now it should be repainted each time it needs to (like when it's uncovered by another window). Windows will take care of this by calling the event handler. You just need to do something useful there.


If you want to store the image in a bitmap (maybe for saving to disk):
http://perso.club-internet.fr/rocherl/DIBitmap.html
The newFromDC routine should do the trick.

(This could also be used to cache the image if it takes a long time to draw it from scratch each time)


Johan Lindstrom posted some information but it went (making motion of flat hand over head from front to back).

:)

I hope the description above was a little more down to Earth. If not, please let me know where the confusion begins.


/J

-------- ------ ---- --- -- --  --  -    -     -      -         -
Johan Lindström    Sourcerer @ Boss Casinos     [EMAIL PROTECTED]

Latest bookmark: "Laziness - brian_d_foy's Journal"
http://use.perl.org/~brian_d_foy/journal/8285
dmoz (1 of 4): /Computers/Programming/Languages/Perl/ 25



Reply via email to