Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

stretch and maintainaspectratio of tppimage

edited August 2004 in General
Is it possible to show an image that if the image size is smaller than the
frame of tppimage, then show the image original size without enlarge, but if
the image is larger than the frame of tppimage, that shrink proportionally
to the frame of tppimage.
Is it possible?

Comments

  • edited August 2004
    Hi Kei,

    If you set the Stretch and MaintainAspectRatio to True, does this give you
    the desired effect?

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2004
    No! If the image is smaller than the tppimage frame and the stretch and
    maintainaspectration is true, then it will enlarge proportionally.
    Any other method?
  • edited August 2004
    Hi Kei,

    Unfortunately ReportBuilder does not have any built in features that will do
    this for you. You will need to compare the size of the image to the size of
    the TppImage control before hand and set the Stretch property accordingly.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2004
    How to do it?
    For Delphi, the TPicture.height specify the height in pixels. how to compare
    with the size fo tmmImage control?
    How can I know (and change) in code that the unit of width and height of
    TppImage Control?
    What unit should be used to compare with TPicture.height and TPicture.width?
    Screen pixels or printer pixels?

    Thx!
  • edited August 2004
    Kei,

    There are many conversion routines located in the ppUtils.pas file that can
    be used to convert screen pixels and printer pixels to microns and vice
    versa. Check out the ppFromMMThousandths and ppToMMThousandths methods.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.