Can you submit this as an issue? I'll assign it for evaluation.

On Friday, May 7, 2021 at 6:08:27 PM UTC+3 P5music wrote:

> I created two test cases that reproduce the issue.
> You find the images and java files in attachment.
> As you can see the screenshots from CN simulator show images with the 
> right size
> while the screenshots from iOS simulator show images with wrong size and 
> wrong positioning of the drawing within the "viewport" of the button (the 
> button has the right size).
> One of the iOS screenshots show less images but it is from another build.
> In general you can see that size can be wrong both bigger or smaller.
> Regards
>
> Il giorno mercoledì 5 maggio 2021 alle 04:23:50 UTC+2 Shai Almog ha 
> scritto:
>
>> This looks fine. Can you isolate a test case that reproduces the problem?
>>
>> On Tuesday, May 4, 2021 at 10:48:05 AM UTC+3 P5music wrote:
>>
>>> I think you have more convenience checking the entire class, as in the 
>>> attached txt file.
>>> Notice that normalButtonSize=48 for iPad II simulator skin (and so it 
>>> seems for the real device).
>>> Regards
>>>
>>> Il giorno martedì 4 maggio 2021 alle 03:56:13 UTC+2 Shai Almog ha 
>>> scritto:
>>>
>>>> What's in the paint() method of SaveIconSoliciting()?
>>>>
>>>> On Monday, May 3, 2021 at 9:37:26 AM UTC+3 P5music wrote:
>>>>
>>>>> Maybe you answered to another thread by mistake.
>>>>> This is what my problem is:
>>>>> I created icons in my app by means of the Flamingo tool. They 
>>>>> originate from svg files and then they become Java classes. It is so also 
>>>>> because some new icons are created, and also they have to be injected in 
>>>>> HTML.
>>>>>
>>>>> I am not using material font in this case.
>>>>> The images resemble the material icons but as you can see in the 
>>>>> example the icon is a new one, it is modified, so it is assigned to the 
>>>>> button like an image.
>>>>>
>>>>> The image (I am referring to the object) has the right size, but the 
>>>>> drawing, or the scaling, or whatever internal method is doing something 
>>>>> wrong.
>>>>> Indeed just a tiny part is visible of the original shape, because it 
>>>>> is in big size (but in normal viewport size), as you can see in the 
>>>>> detail 
>>>>> of the attached image.
>>>>>
>>>>> Regards
>>>>> Il giorno lunedì 3 maggio 2021 alle 03:58:32 UTC+2 Shai Almog ha 
>>>>> scritto:
>>>>>
>>>>>> I don't understand the logic of your app here.
>>>>>> You're scaling a font icon. 
>>>>>> Converting it to a non-scalable png.
>>>>>> Then placing that in a self scaling button to scale again.
>>>>>>
>>>>>> I suggest isolating this to a runnable test case.
>>>>>>
>>>>>> On Sunday, May 2, 2021 at 10:29:07 AM UTC+3 P5music wrote:
>>>>>>
>>>>>>> No, normalButtonSize is not huge. Maybe my written explanation was 
>>>>>>> not clear enough in regard of the images.
>>>>>>>
>>>>>>> As you can see from the attached images the buttons have the right 
>>>>>>> size, so
>>>>>>> I can say that
>>>>>>> the image itself is not huge, but the internal drawing is out of 
>>>>>>> scale so
>>>>>>>
>>>>>>> the resulting picture has the right size but it depicts only a small 
>>>>>>> fraction of the total area of the drawing.
>>>>>>>
>>>>>>> You can see that in one image in particular a detail is "magnified", 
>>>>>>> so you recognize the shape of the icon and it is clear that
>>>>>>> it is like 
>>>>>>> the image is huge but the viewport just shows a portion of it.
>>>>>>>
>>>>>>> The viewport is the button
>>>>>>> and it is the size of the resulting image: 
>>>>>>> it has the right size in pixels but the drawing exceedes it.
>>>>>>> Regards
>>>>>>> Il giorno domenica 2 maggio 2021 alle 03:37:11 UTC+2 Shai Almog ha 
>>>>>>> scritto:
>>>>>>>
>>>>>>>> What's normalButtonSize ?
>>>>>>>> I'm assuming it's huge on iOS.
>>>>>>>>
>>>>>>>> On Saturday, May 1, 2021 at 5:36:05 PM UTC+3 P5music wrote:
>>>>>>>>
>>>>>>>>> Here are the images (see previous message)
>>>>>>>>> Regards
>>>>>>>>> Il giorno sabato 1 maggio 2021 alle 14:09:35 UTC+2 P5music ha 
>>>>>>>>> scritto:
>>>>>>>>>
>>>>>>>>>> My CN1 app has some buttons on the interface with images created 
>>>>>>>>>> with the Flamingo tool, that is, they are created in Java code from 
>>>>>>>>>> SVG 
>>>>>>>>>> files.
>>>>>>>>>> On the simulator and on Android the user interface is almost 
>>>>>>>>>> good, with right buttons image (see attached image 
>>>>>>>>>> right_button_image_dimension_example.png)
>>>>>>>>>>
>>>>>>>>>> On iOS the buttons have the right size but the images are huge or 
>>>>>>>>>> tiny
>>>>>>>>>> (see attached image wrong_button_image_dimension_example
>>>>>>>>>> for the huge case)
>>>>>>>>>>
>>>>>>>>>> This is the code for the most recognizable one:
>>>>>>>>>> saveIconImageSoliciting=new 
>>>>>>>>>> SaveIconSoliciting().scaled(normalButtonSize,
>>>>>>>>>> normalButtonSize).toImage();
>>>>>>>>>> saveButton=new ScaleImageButton(saveIconImageSoliciting);
>>>>>>>>>> where
>>>>>>>>>> SaveIconSoliciting is the class created by Flamingo.
>>>>>>>>>>
>>>>>>>>>> see also these thread
>>>>>>>>>>
>>>>>>>>>> https://groups.google.com/g/codenameone-discussions/c/K94DFhApfRY/m/CD3ISV3RBgAJ
>>>>>>>>>> Can my app be affected by that on iOS?
>>>>>>>>>> Otherwise what could be the cause and how to fix?
>>>>>>>>>> Thanks in advanvce
>>>>>>>>>>
>>>>>>>>>

-- 
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/66e33072-7ca5-482f-bdc1-8b6523b68e5bn%40googlegroups.com.

Reply via email to