AC15.04 Scaling issue

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #68564
    Lasse
    Participant

    Arrow loses its tip after PPI is greater than 144. Some combo boxes show it correctly thou.

    Attachments:
    You must be logged in to view attached files.
    #68576
    sergunalpha
    Keymaster

    This issue will be solved in the nearest release.

    #68592
    Lasse
    Participant

    Another scaling issue in TsComboBox

    Attachments:
    You must be logged in to view attached files.
    #68594
    Lasse
    Participant

    Also I noticed in sCommonData.pas unit and function ScaleInt those Value * PPI div 96 should be MulDiv(Value, PPI, 96).

    For example 11 * 120 div 96 = 13 but MulDiv(11, 120, 96) = 14.

    #68611
    Support
    Keymaster

    Interesting. Why 14? Correct value is 13?
    I didn’t knew about a difference between these two ways. I will research it and the issue with ComboBox scaling too.

    #68618
    Stephane Senecal
    Participant

    11 * 120 = 1320
    1320 / 96 = 13.75
    Round(13.75) = 14

    Stephane Senecal
    CIS Group
    Delphi programmer since 2001

    #68634
    Lasse
    Participant

    Yes, 1320 div 96 = 13.

    #68635
    Lasse
    Participant

    If you take a look at any ChangeScale procedure in Vcl (TControl, TWinControl, etc.), all of them are using MulDiv.

    #68642
    Support
    Keymaster

    Interesting. It means that MulDiv works using a floating point calculations (slower).
    I will think where to use it instead of “*” and “div”.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.