Brian Slesinsky has posted comments on this change.

Change subject: Ensures integer pixel values and adds getters for subpixel values
......................................................................


Patch Set 1:

After thinking about this overnight, here's my take on this. (Keep in mind that I'm not an expert in this stuff.)

Most existing users probably don't care about subpixel values and changing the API would be hugely disruptive with little gain for them. So shouldn't deprecate any existing API's and using x|0 to round off the measurements is probably the right fix.

For those users who do want subpixel values, I think it makes sense to introduce a SubpixelElement class which is exactly like Element except that the appropriate methods return doubles. Since this is a JSO, I think we can freely cast from one to the other? (I haven't actually done much with JSO's, and it seems like there might be issues with dev mode?)

Since the cast is probably awkward, introducing an Element.toSubpixelElement() method (much like Goktug suggested) that does the proper incantation seems like a nice fix. If it turns out we need to do the same thing for some subclasses then we use the same naming convention. For example, we might have ImageElement.toSubpixelImageElement() and it's a bit verbose but there's no conflict.

It's a bit ugly that we'll have both API's around forever but I think that's the way it goes; backward compatibility is more important. If someone really wants to start with a clean slate then they can use Elemental (when it's done) or Dart.

--
To view, visit https://gwt-review.googlesource.com/3090
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I27e98f0ad3c1c236b2d85d24f197719fa4cd352a
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John Ahlroos <[email protected]>
Gerrit-Reviewer: Artur Signell <[email protected]>
Gerrit-Reviewer: Brian Slesinsky <[email protected]>
Gerrit-Reviewer: Daniel Kurka <[email protected]>
Gerrit-Reviewer: Goktug Gokdogan <[email protected]>
Gerrit-Reviewer: Leeroy Jenkins <[email protected]>
Gerrit-Reviewer: Ray Cromwell <[email protected]>
Gerrit-Reviewer: Thomas Broyer <[email protected]>
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to