Screen Edge Calculations

Ok - I've searched the forum and API Methods - and can't find a solution to this obviously well known and easy problem...

For any given row on a display screen or field... what is the obscurity offset/skew from the left and right of center?

For rectangular screens, that's easy: always zero offset.

For round screens, I can calculate the Perpendicular Bisector Chord length, using some fun math (if that is really the only way to figure this out), based on the percentage from the center. Surely there is an easier way a simple API method that returns the actual width at a given row?

But for a semi-round, I'm not sure how to determine the edge of the screen for any particular row. Any ideas on a general solution. For example, maybe all semi-round displays have a corner curvature with a particular property such that a formula describes the amount of obscurity offset?

The values in RED are just illustrations... not actuals.

The ACTUAL width at LINE "Y" of a round screen with max width (aka: diameter) W is:  Width = 2 * SQRT( WY - Y^2)

And a more powerful formula is based on percentages. If you are on line X% down, then the width in percent is: W% = 2 * SQRT (X% - X%^2)

  • I'd disagree.  Think about having labels like "km" or "mi" following your text with right hand fields.  If it's the 2nd row, I'd want that aligned to the bottom.  If it's the 3rd row, I'd want it aligned to the top.

    I agree it makes for subtle differences.  But it's not for us to decide what makes sense for individual implementations.  CIQ should provide the tools, not limit the implementation.

    This would make even more difference in a 4 field, one field per line, layout where the two middle rows just show Left and Right obscurity.  Aligning your text closer to the bottom on row 2 and higher on row 3 could make a reasonable difference for width.

    Obscurity flags really are too limiting here, especially as screen layouts get more complex.

  • I like Left or Right justify for some fields... with a 5% offset. Looks nice for some fields on my rectangular Edge. So knowing the visible edge would be nice. And really kinda unfortunate that there is no facility to determine it.

  • As far as additional positioning for something like mi or km, you can use getTextWidthInPixels to shift the number so with the number along with the label for is centered.  Or maybe I don't understand.  The time for Timer is likely centered in a similar way with the two different fonts.

  • This is my FourTime+ field. Notice my let/right justification. Not sure how I'd design this for a round screen, but clearly this layout doesn't work if I don't know where the left/right edges are... The lower right quadrant of the field scrolls through 9 different times/timers (eg: start time, stop time, lap time, max stop time, current move time, etc, etc). This is one field. It works great on larger displays like the Edge 1030.