Bug Issue: Set height/width of image is using the x1 scale always


Pages: 1

Luyren

  • Master Stencyler
  • *
September 19, 2017, 01:57:27 pm
b9511

When using the block "set [height/width/opacity] to [ ]% on [ ]" with an actor image, it sets the percentage height/width based on the x1 scale. In a game with x2 scale for example, a setting the height and width to 200% would make the image the same size as the displayed actor, and 100% would make it half as big.

Sample Game: it is set to x2 scale on desktop. The image is set to 200% height and width, but it is the same size as the actor. If you reduce the scale to x1, you will see the image is correctly double in size.
« Last Edit: September 19, 2017, 06:23:15 pm by Luyren »


New attachment added by Luyren - September 19, 2017, 01:57:47 pm


Issue updated by Luyren - September 19, 2017, 06:23:15 pm
  • Issue renamed from "Set height/width of image using the x1 scale always" to "Set height/width of image is using the x1 scale always"


Issue updated by Justin - February 01, 2018, 11:10:04 am
  • Tags added: 3.5 NP


rob1221

  • Master Stencyler
  • *
April 06, 2018, 07:32:36 am
Fixed in b9842 only for when autoscale images is turned off.  Since the actor image is used directly, the copy of image block will sometimes be needed.

For when autoscale images is enabled, the reason this isn't working as expected is because the image instance scale is already set to 200%.  To get the result you want you can multiply that by the engine scale.  Ideally, the autoscale image option should ignore images that are already scaled, but currently there is no way to attach scale info to the images.
  • Status changed from New to Confirmed


Luyren

  • Master Stencyler
  • *
April 06, 2018, 12:48:11 pm
On b9842, can confirm that with Autoscale Images Off, the images appear to be the right size when I increase their size in all scale (x1 to x4), in Flash, HTML5 and Windows Export; was unable to test Cppia.

The old behavior still happens with Autoscale Images Off.

I noticed that regardless of the Autoscale Images setting, drawing text on images with the Image API in scales bigger than x1 crops the text. Is this related, or should I post a new issue?
« Last Edit: April 06, 2018, 12:48:38 pm by Luyren »


rob1221

  • Master Stencyler
  • *
April 06, 2018, 01:05:20 pm
That might be the other image issue you posted.  If the drawn text doesn't downscale, then it won't fit on images created at 1x because the images don't autoscale, only the instances.  For autoscale images = off this is the expected behavior and you'll need to use larger images depending on the scale.  For autoscale = on, downscaling might be the better option but it would still result in a loss of quality.


Luyren

  • Master Stencyler
  • *
April 06, 2018, 01:28:32 pm
I nearly forgot about that other issue. Oddly enough, the game I'm currently working on is in x2 scale, and I'm using a font other than the default font for drawings and the cropping issue I just mention doesn't happen at all.
« Last Edit: April 06, 2018, 01:29:19 pm by Luyren »


Issue updated by Justin - April 09, 2018, 10:44:38 am
  • Tags added: scaling


Justin

  • Master Stencyler
  • *
June 15, 2018, 09:08:23 pm
Redesigned the Image API and game scaling a bit to make things better here.

http://community.stencyl.com/index.php/index.php?topic=54898.msg300233#msg300233
  • Status changed from Confirmed to Resolved
  • Issue Assigned from (none) to Justin
  • Tags removed: 3.5 NP, scaling


Pages: 1

Details

  • Reported
    September 19, 2017, 01:57:27 pm
  • Updated
    June 15, 2018, 09:08:23 pm

  • View Status
    Public
  • Type
    Bug
  • Status
    Resolved
  • Priority
    Normal
  • Version
    3.5.0 beta 1
  • Fixed in
    (none)
  • Assigned to
    Justin
  • Category
    Design Mode Blocks

Tags


Attachments

* Test Text and Image.stencyl (403.95 kB - downloaded 38 times.)