Drawing multiple custom controls in a metafile canvas.



Consider FooBar, a custom control.
The custom control of course has drawing routines that render the state of
the control.

Now consider a form with two FooBar custom controls.
Dimensions are WxH@X,Y
Form is 300x200
FooBar1 is 100x100 @ 10,10
ForBar2 is 250x75@25,115

I've inherited some code that uses a MetafileCanvas to render a _single_
FooBar for printing purposes

....
var w, h :integer;
emf:TMetafile;
....
procedure CreateMetafile;
var MC:TMetafileCanvas;
begin
emf := TMetafile.Create;
emf.Width := w;
emf.Height := h;
MC:=TMetafileCanvas.Create(emf, Canvas.Handle);
Render(MC, w, h);
....


I would like to draw (into the metafile canvas) _two_ FooBars, having same
geometric relationship as found in the form being rendered on the screen.

Does Delphi have something like 'MetafileForm'?

If not, is there a way to render (without changing the rendering code) into
a specific region of the metafile canvas?
- Something like a preemptive translate so that the render routine working
at 0,0 is really at some x,y in the MF canvas?

Thanks for listening.

--
Richard A. DeVenezia


.



Relevant Pages

  • Re: Using Custom Web Controls inside Web Part
    ... and also inserted into into Web parts to be used on Team sites. ... > Now i have a Web Custom Control which has a Label in it and it is Rendered ... > by using render method. ... I want to render this Web Custom Control in my ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Viewstate Issue?
    ... > I've build a custom control that's essentially a header for my web site. ... Within the render ... > 'refreshes' in the design view, ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: Setting Control Properties before postback
    ... I keep getting the feeling that we are talking at cross purposes with Angel. ... I put a breakpoint on the button click event and the page ... > event and it executes after my custom control has been rendered. ... > control's Render method and that breakpoint is hit before the Page_Load ...
    (microsoft.public.dotnet.framework.aspnet)
  • Using Custom Web Controls inside Web Part
    ... (Out of Team Services). ... Now i have a Web Custom Control which has a Label in it and it is Rendered ... by using render method. ... I want to render this Web Custom Control in my Web ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Drawing multiple custom controls in a metafile canvas.
    ... is there a way to render (without changing the rendering code) ... > a specific region of the metafile canvas? ... > - Something like a preemptive translate so that the render routine working ... > at 0,0 is really at some x,y in the MF canvas? ...
    (comp.lang.pascal.delphi.misc)