trichview.com

trichview.support




Re: Drawing controls directly onto canvas


Return to index


Author

Message

Sergey Tkachenko

Posted: 04/18/2002 19:03:26


Just draw your image onto Canvas, in rectangle

Bounds(x,y,dli.Width,dli.Height)


All scaling is done before the call of this method.



> I've created a TRVQuestionItemInfo derived from TRVControlItemInfo. The

> control will be a panel containing other controls. The print method below

> uses the control drawing routines in CtrlImg, but scaling needs to be

added.

>

> procedure TRVQuestionItemInfo.Print(Canvas: TCanvas; x, y, x2: Integer;

>   Preview, Correction: Boolean; const sad: TRVScreenAndDevice;

>   RichView: TRVScroller; dli: TRVDrawLineInfo; Part: Integer);

> begin

>   DrawPanel_(Control as TPanel, Canvas, x,y);

> end;

>

> I'd appereciate a pointer as how to handle the scaling in this case -

surely

> not SetMapMode, SetWindowExtEx, etc?!

>

>







Powered by ABC Amber Outlook Express Converter