My app has a layout with a BrowserComponent inside.
It has text and images inside:

setPage("<HTML><BODY>" +
                "<img  src='"+locationIconUri+"' />"+
                "<div id=\"editText\" style=\"font-size:40px;\" 
contenteditable=\"true\">This text can be edited by the 
user.</div></BODY></HTML>","");

I am able to encode some images and put them on the page, with:

public String createIconImageUri(Image iconImage)
    {
        EncodedImage em = EncodedImage.createFromImage(iconImage, false);
        byte[] data = em.getImageData();
        String iconUri=BrowserComponent.createDataURI(data,"image/png");
        return iconUri;
    }

I see that the text and the image size does not match what is in the layout 
external to the BrowserComponent, like they are doubled in the BC.
There is some dpi question here. Note that the simulator skin is iPad3 and 
dpi=240 (wrong? see my other thread) and the size of the images on the 
layout is 72.
What can be said about the viewport of the CEF BrowserComponent or similar 
adjustments?
Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/56f03163-428c-4df1-a360-bbf0d9cccf19o%40googlegroups.com.

Reply via email to