|
|||||
| Home > Coding Corner > Components > DtpDocuments > F.A.Q. | |||||
|
Coding Corner
|
Quick Jumps: DtpDocuments Frequently Asked Questions (FAQ)
Answers I need to be able to draw some parts directly on a device canvas, is there a way to get the handle of the canvas used in TDtpDocument? Yes, there is a OnPaintBefore and OnPaintAfter event with a TCanvas parameter.
The TCanvas.Handle is the HDC. You can use it to do your default How can I draw my own derived shapes? There is a way to draw directly to a shape's canvas. In this case, derive your own shape from TDtpEffectShape (if you want to be able to use effects, like shadow, later), or from TDtpShape. There are two different methods you can override to draw your own shapes: procedure TDtpShape.Paint(Canvas: TCanvas); virtual; Override this method if you want to draw on a TCanvas with VCL or GDI
commands. TCanvas.Handle is the HDC. See TCanvas in the Delphi docs for
more info too. Since GDI has no understanding of alpha-channel information,
each pixel drawn will be considered fully opaque, and each untouched pixel
will procedure TDtpShape.PaintDIB(DIB: TBitmap32); virtual; Override this method if you want to draw directly to the RGBA 32-bits
Device In both cases, you can use the properties below to aid you in drawing
onto CanvasLeft: The position
of the left edge (integer) of the shape. So, to draw a rectangle on the shape in the Paint event: procedure TMyShape.Paint(Canvas:
TCanvas); If you are drawing complex shapes, you can analyse the TCanvas.Cliprect I printed some documents and a grey text is printed on the white background. Does this happen because it is the trial version? Yes. The trial version always prints"TRIAL VERSION DTPDOCUMENTS",
a few lines of gray text. Of course the registered versions do not have
this. If I purchase the DCU version will I be able to customise the captions of the shape editors used or do I have to purchase the full source code version instead? The editor uses frames for which you will get the full source even in
the Is it possible to create my own editing interface? The document itself (document, pages, shapes, drawing surface) is completely What are your future upgrade plans, in terms of the features you intend to implement? DtpDocuments is relatively new and therefore very much dependent on input from its current user base. We have plans for these enhancements:
Since the component is still very much in development we are very happy with customers that will give us good feedback. Updates to the library will be totally free for 2 years after purchase, and after that, a small upgrade price will be asked (much less than the original purchase price).
|
||||
| Page last changed: 15Feb2010 © Copyright 2002-2010 SimDesign BV | |||||