Skip to content
  • Ell's avatar
    app: add "orientation" property to GimpToolCompass + improvements · d2f33cf1
    Ell authored
    Add an "orientation" property to GimpToolCompass, which can be one
    of "auto", "horizontal", or "vertical", and which controls the
    orientation of the line against which the angle is measured, when
    not in 3-point mode (previously, the line would always be
    horizontal.)  When "orientation" is "auto", the orientation is
    automatically set to either horizontal or vertical, such that the
    measured angle is <= 45 deg.
    
    Keep the line horizontal, or vertical, in display-space, rather
    than in image-space, so that the compass works correctly even when
    the canvas is rotated and/or flipped.
    
    Fix the compass's behavior when the image's horizontal and vertical
    resolutions are different, both with and without dot-for-dot.
    
    Add "pixel-angle" and "unit-angle" read-only properties, which
    return the measured angle either with or without taking the image's
    resolution into account, respectively.  These properties will be
    used by the measure tool in the next commit, instead of having it
    implement its own angle calculation.
    d2f33cf1