Custom shapes?
Hi,
What is the minimum that one would need to code in order to draw a shape
that TppShape cannot? A triangle, for example.
I need to do some custom bars on a report and I'd rather not have to
generate a bunch of bitmaps or risk one of TeeChart's crashing fits.
Thx,
Teller
What is the minimum that one would need to code in order to draw a shape
that TppShape cannot? A triangle, for example.
I need to do some custom bars on a report and I'd rather not have to
generate a bunch of bitmaps or risk one of TeeChart's crashing fits.
Thx,
Teller
This discussion has been closed.
Comments
This can be done by creating a custom report component and registering it
with ReportBuilder. Your component would be very similar to the Shape
component only with instructions to draw a triangle for instance rather than
a rectangle or ellipse. For an example of creating a custom component and
registering it with RB, see the demo located in the \RBuilder\Demos\6.
RCL\... directory.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Options:
1. Create a TmyShape component as has already been discussed.
2. There is freeware TwPaintBox component on our RCL Download page. It
provides a canvas that you can draw to.
http://www.digital-metaphors.com/download/report_component_library.html
3. Draw to a metafile and use a TppImage component to render the metafile.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Are any of these options better/worse when outputting to PDF?
I think for a simple shape, I would use the PaintBox or Image. I think those
both produce a TppImageDrawCommand - which would be supported by the PDF
export.
If you are using the native PDF export, then adding a custom component that
produces a custom draw command will not inherently be supported by the PDF.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
information!
Speaking of images, I was thinking images ought to be about 150dpi in order
to scale cleanly on different printer resolutions...does that sound correct?
I would go larger, but that would take up a lot of memory...
We have never performed that type of test. Try creating some simple tests
and see what produces the best results.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com