PDA

View Full Version : TDirectDrawSurface TextOut



klanpaia
11-07-2011, 06:25 AM
I created a variable that decend from TDirectDrawSurface;

Var
Test : TDirectDrawSurface;

I want to design a writing:
Test.Canvas.TextOut(10,10,'Hello World');

Display screen
DXDraw1.Surface.Draw(0, 0, Test);

Only it's giving error. Does anyone know how to fix?

Traveler
11-07-2011, 08:01 AM
You have to release the canvas after drawing the text.


DXDraw1.Surface.Draw(0, 0, 'Hello world');
DXDraw1.surface.Canvas.release;

klanpaia
11-07-2011, 05:59 PM
I want to create a layer that facilitates the programming even more. I need to create an object TBlock. That can create text inside it and change the background color.