when i use CreateSurface() create many surface,it cost too much time,how should i handle this?
about CreateSurface()
Don't create many surfaces.
thanks,but my project need to show many picture.i should find a method to change the surface's data with another picture's data; is there a function in edgelib?
Put all your (small?) images on one big surface. Then blits the parts you need to the screen.
thanks a lot,is there a function can active load image's data to a 2D surface?
Hi Sunfred,
If you have multiple images in one sheet, you need to use the RECT structure to select one image when blitting.
For example, to blit the topleft image of 32x24 pixels use this code:
If you have multiple images in one sheet, you need to use the RECT structure to select one image when blitting.
For example, to blit the topleft image of 32x24 pixels use this code:
- Code:
RECT rc;
SetRect(&rc;, 0, 0, 32, 24);
display->BltFast(x, y, &source;, &rc;);
thanks!your advise is helpful.