Hi,
I'm using Canvas, I need to get a property from the context:
context.webkitBackingStorePixelRatio;
I'm not sure how to make a jsni function to do this (this property does not seem to have a wrapper already in the gwt Context2d class):
// How do we define this function and pass in our GWT Context2d instance?
public static native double getBackingStoreRatio(Context2d context) /*-{
return context.webkitBackingStorePixelRatio || 1;
}-*/;
Canvas canvas = Canvas.createIfSupported();
Context2d context = canvas.getContext2d();
double isThatRight = getBackingStoreRation(context);
Yeah I'm not sure what the sytax is for this, the Context2d variable is a GWT object already,
Thanks
(trying to get the variables from this article for hdpi screen support)