<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Agreed about previous comments and this one too – I had standalone code
that does this and you get into weird distortions if you scale same form more
than once, so refer always to original sizes.</DIV>
<DIV> </DIV>
<DIV>Also you may need to do extra for grids – grid font size has to be checked
against default row height and column widths generally also need to be resized,
as some are scaled and some not just to make life fun.</DIV>
<DIV>I have code to do this if of use for Stringgrids.</DIV>
<DIV> </DIV>
<DIV>Also usually images do not scale.</DIV>
<DIV> </DIV>
<DIV>And then there is the issue of catering for different screen DPI just to be
fun, form scaling will behave differently if not 96DPI</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=jsmith@deltics.co.nz>Jolyon
Direnko-Smith</A> </DIV>
<DIV><B>Sent:</B> Wednesday, October 12, 2016 12:59 PM</DIV>
<DIV><B>To:</B> <A title=delphi@listserver.123.net.nz>NZ Borland Developers
Group - Delphi List</A> </DIV>
<DIV><B>Subject:</B> Re: [DUG] Procedure run from main program</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV dir=ltr>To all of the implementation tips/observations aside, I would add
the following:<BR><BR>Any scaling based on simply modifying current values and
using floating point and rounding is going to suffer from asymmetry and creeping
rounding issues if forms are frequently scaled and rescaled.<BR><BR>Asymmetry I
mean that - for example - applying a scale of 3.0x to a form will not
necessarily be exactly undone by then applying a scale of (1 / 3) x
(0.333333333333x). Recurring decimals are the most obvious case where
problems are likely to occur, but the nature of floating point representation
means that they are not the only ones.
<DIV> </DIV>
<DIV>This may not be a concern in your case, but then again it might be.
:)<BR><BR>A more robust approach would be to establish reference dimensions for
each form (the "1 x" dimensions) and to always scale with respect to those
reference dimensions.</DIV></DIV>
<DIV class=gmail_extra> </DIV></DIV></DIV></DIV></BODY></HTML>