Correct origin for graphics object?

  1. last year

    Christian S

    7 May 2018 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store Germany

    Hello,

    a client complains about my DrawRotatedTextMBS function not drawing at the right spot.

    Is there a way to know for a graphics from printer how much offset to use?
    Xojo seems to know it as it draws there.

    And for some printers the offsets are zero as it's okay there.

    Seems like the paper may have an offset which is not used for the CGContext object we get from graphics.

    REALGetGraphicsOrigin seems not to help as it's always 0/0.

  2. Christian S

    7 May 2018 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store Germany
    If Printing then
    	x = x - PageSetup.PageLeft
    	y = y + PageSetup.PageTop
    End If

    in the Xojo code doesn't solve it perfectly.

  3. Jürg O

    7 May 2018 Pre-Release Testers, Xojo Pro

    Is there a StringShape involved? If so, then there is a known issue with position of StringShapes (only when printing): Feedback Case #49634

  4. John M

    7 May 2018 Pre-Release Testers, Xojo Pro New York / New Jersey

    If Printing then
    x = x - PageSetup.PageLeft
    y = y + PageSetup.PageTop
    End If

    Your code is correct, and AFAIK it works OK on Mac.

    However, if you're using Xojo 2017 or later, there are also problems with the unprintable area not being available via the Page
    Setup on Microsoft Windows, which is critical for correctly positioning text (including the RotatedTextMBS). Instead, you get whatever the user sets in the Page Setup dialog window (typically 1" from the paper edge). I don't know of a workaround, so I'm stuck with 2016r3.

    Hopefully Xojo can get this fixed sooner rather than later.

or Sign Up to reply!