Drawing multiple custom controls in a metafile canvas.
- From: "Richard A. DeVenezia" <radevenz@xxxxxxxxxxxxx>
- Date: Sat, 29 Oct 2005 12:34:42 -0400
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
.
- Follow-Ups:
- Re: Drawing multiple custom controls in a metafile canvas.
- From: Tom de Neef
- Re: Drawing multiple custom controls in a metafile canvas.
- Prev by Date: Re: [Delphi 6] Introspection - iterate through all class members of a given type?
- Next by Date: component nested in component
- Previous by thread: webcam capture
- Next by thread: Re: Drawing multiple custom controls in a metafile canvas.
- Index(es):
Relevant Pages
|