realm-draw icon indicating copy to clipboard operation
realm-draw copied to clipboard

Apply the screen resoultion policy of the iOS version.

Open dalinaum opened this issue 8 years ago • 11 comments

screen shot 2016-12-16 at 3 59 33 pm

The mobile device uses 667 x 667 or 736 x 736 (Plus version) and tablet device version 1024 x 1024 or 1366 x 1366 (Pro version). It always uses a canvas depends on the device’s logical resolution. (logical height x logical height) I checked the logical resolution is same with the following link: http://iosres.com/

The logical resolution is half scale of the resolution, so I just use half scale for all devices.

dalinaum avatar Dec 16 '16 07:12 dalinaum

Given that these apps are used for demo purposes, I think this solution kinda sucks (even though it is correct). Basing the canvas on some fixed iOS screen size doesn't scream cross-platform at all.

IMO having a [0,100] and use floats for positioning would scale to any screen density.

cmelchior avatar Dec 16 '16 08:12 cmelchior

The Xamarin one currently normalises everything so it works on all device sizes. The only thing is that aspect ratio varies a bit (OK, in the case of my Android tablets, varies a lot). I think that delivers a vastly better experience than this fixed approach.

I don't think it's a good idea to take policy from an iOS version that was developed on the run and, frankly, I suspect was only ever aimed at one device.

AndyDentFree avatar Dec 16 '16 09:12 AndyDentFree

Yeah, the aspect ratio is the biggest problem. There is basically two choices:

  1. Allow any aspect ratio, but this will result in some drawings being rendered offscreen
  2. Set a fixed aspect ratio but allow whitespace around the canvas

Neither of these is really ideal, but IMO being able to see the entire drawing is more important than being allowed to draw on the whole screen. It is not a strong opinion though.

cmelchior avatar Dec 16 '16 09:12 cmelchior

Allow any aspect ratio, but this will result in some drawings being rendered offscreen

Uhhh, no, it guarantees the entire drawing is always visible, but distorted to a greater or lesser degree.

The option which draws some things offscreen is:

  1. Set a fixed aspect ratio and crop the canvas

AndyDentFree avatar Dec 16 '16 09:12 AndyDentFree

Yes, your right. That is the least desirable solution though IMO

cmelchior avatar Dec 16 '16 09:12 cmelchior

I think for the purposes of showing interaction, allowing distortion but scaling to show the entire canvas is by far the better solution, sorry. What that means is we do need to agree on what value we scale each dimension to - I used 4,000.0 because I was trying to debug some jaggies and thought they may be scaling related. But as @cmelchior pointed out, we could easily normalise to 100.0.

AndyDentFree avatar Dec 16 '16 09:12 AndyDentFree

Since I'm not working on the demos I'll just let you decide that :) As long as the devices are relatively similar the distortion will be minimal anyway. I would probably not demo on two very different screens though.

cmelchior avatar Dec 16 '16 09:12 cmelchior

Although I prefer the option 2 and 3 more than the option 1, but the option 1 is OK. I think we should use the same policy among the iOS version, the Android version and the Xamarin version. Do you have any preference or idea? @TimOliver

dalinaum avatar Dec 16 '16 10:12 dalinaum

I think there is another option: 4. Use the fixed size canvas and aspect ratio, add the hand/pencil button and let the user move the canvas.

dalinaum avatar Dec 16 '16 10:12 dalinaum

Ugg, yes you're right from a design point of view allowing panning with a hand is another valid design.

However, there are a couple of reasons why I think that is not a good option right now:

  1. It adds significant complexity to implement smoothly.
  2. It breaks the idea of being able to easily see that changes are being propagated by the server, because you may have panned a given device so they are completely offscreen.

AndyDentFree avatar Dec 16 '16 10:12 AndyDentFree

Thanks Leo! I'm on a plane now so I'll have to review it in more detail later.

But I basically just wanted two things with the iOS version.

  • No aspect ratio distortion, especially when rotating the device.
  • As much visible as possible, regardless of screen dimensions.

TimOliver avatar Dec 20 '16 23:12 TimOliver