GDI+ questions
- From: "Albert P." <Inco@xxxxxxxxx>
- Date: Mon, 5 Oct 2009 18:09:09 +0200
Hi,
I'm using GDI+ api to draw a day time planning into a picture, it's great,
very fast and import of png with transparency is very neat.
I have one problem, 90% of the time, I don't need to redraw all the picture,
the background is the same and only the items on it changes.
I would like to make a copy of this background and when I need it redraw it
using GdipDrawImageRectRectI (which I use to draw items on my planning and
work very well) instead of redrawing completly the background using
rectangle, line, ... functions.
I tried a lot of thing to save a copy of my background before drawing the
items (GdipCreateBitmapFromGraphics, GdipSaveImageToFile, ...) but I'am not
able to get this background saved. For example, the function
GdipCreateBitmapFromGraphics send back 0 (everything ok) but when I try to
draw the resulting image, nothing. (actually, I save the picture box on the
disk using dev tools native function and redraw the background using
GdipLoaImageFromFile/GdipDrawImageRectRectI combo wich is quite slow)
Do you have any idea of what I am doing wrong ?
My second problem is to refresh the screen after drawing. I tried API like
InvalidateRect, InvalidateRgn, ... to no avail, if I move another windows on
top of my program and then remove it ... the screen refresh correctly (my
software development tools don't have redraw property, I must use an API)
Any help will be much apreciated.
As English is not my native language, if you need me too explain better,
please ask.
Many thanks,
Albert P.
.
- Follow-Ups:
- Re: GDI+ questions
- From: Nobody
- Re: GDI+ questions
- From: Thorsten Albers
- Re: GDI+ questions
- Prev by Date: 30164
- Next by Date: Re: GDI+ questions
- Previous by thread: 30164
- Next by thread: Re: GDI+ questions
- Index(es):
Relevant Pages
|