Skip to content
This repository was archived by the owner on Nov 23, 2021. It is now read-only.

Apply the screen resoultion policy of the iOS version.#5

Open
dalinaum wants to merge 1 commit into
masterfrom
lk/android/resoultion
Open

Apply the screen resoultion policy of the iOS version.#5
dalinaum wants to merge 1 commit into
masterfrom
lk/android/resoultion

Conversation

@dalinaum

Copy link
Copy Markdown
Contributor

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 dalinaum self-assigned this Dec 16, 2016
@cmelchior

Copy link
Copy Markdown
Contributor

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.

@AndyDentFree

Copy link
Copy Markdown
Contributor

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.

@cmelchior

Copy link
Copy Markdown
Contributor

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.

@AndyDentFree

Copy link
Copy Markdown
Contributor

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

@cmelchior

Copy link
Copy Markdown
Contributor

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

@AndyDentFree

Copy link
Copy Markdown
Contributor

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.

@cmelchior

Copy link
Copy Markdown
Contributor

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.

@dalinaum

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

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.

@AndyDentFree

Copy link
Copy Markdown
Contributor

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.

@TimOliver

Copy link
Copy Markdown
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants