Product : Engine, Version : 5.0.1.1034, ArticleID : 41023809

HowTo : Render Information

Article41023809
TypeHowTo
ProductEngine
Version5.0.1.1034
Date Added12/14/2004
Submitted bySteve Smith
Keywords

Subject

Render Information

Summary

Render Information

Solution

The render object draws to an in memory bitmap of what is displayed in the vdraw.
 
Refresh updates the vdraw with the memory bitmap.
 
Redraw re-creates the memory bitmap and will erase any items such as lines I added to the render object.

 
rend = Vdraw.Render is a memory bitmap render. The bitmap size is exactly the same as the VectorDraw window client size.
Refresh takes this bitmap and put it as it is in the VectorDraw window device.
If you call rend=Vdraw.ScreenRender then you directly draw in the VectorDraw window device.
By default VectorDraw draws the entities in the Vdraw.Render (memory bitmap).
VectorDraw uses the ScreenRender for rubber operations( for example drawing the cursor,getLine,getCorner,cmdMove,cmdRotate etc).
 
Which of them is most useful to you, depends on what exactly want to do.Maybe instead of the Render,sometimes it is better to use ScreenRender. Notice that after a call of redraw or refresh you will lose the custom draw figures which been drawn with screenRender because VectorDraw will take the bitmap of memory render and put it over the ScreenRender.
 
".Setrop(VdConstMixMode.INVERSE_PEN)"
Let me explain you what is happening with the above command. When VectorDraw draws on the screen, uses a bitmap. When VectorDraw draws an entity, changes the color of the pixels at a particular point of the bitmap. So when you call INVERSE_PEN, the color of the pixels that will be drawn is the result of a calculation between the color of the entity and the color that the bitmap already has at that point(entitycolor XOR bitmapcolor=drawcolor). So if you have a background color black and the entity has white color then the result will be white, if background is white and the entity is also white then the result is black.