@@ -20,7 +20,8 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
2020#include " filedefs.h"
2121#include " objdefs.h"
2222#include " parsedef.h"
23-
23+ #include " execpt.h"
24+ #include " exec.h"
2425#include " stacklst.h"
2526#include " undolst.h"
2627#include " image.h"
@@ -166,20 +167,30 @@ void MCImage::startmag(int2 x, int2 y)
166167 MCmagimage = this ;
167168 state |= CS_MAGNIFY;
168169
169- MCAutoStringRef buffer;
170- MCStringFormat (&buffer, " %d" , rect.width * MCmagnification);
171- sptr->setsprop (P_MAX_WIDTH, *buffer);
170+ // MCAutoStringRef buffer;
171+ // MCStringFormat(&buffer, "%d", rect.width * MCmagnification);
172+ // sptr->setsprop(P_MAX_WIDTH, *buffer);
173+ MCExecPoint ep (this , NULL , NULL );
174+ MCExecContext ctxt (ep);
175+
176+ sptr->setintprop (ctxt, 0 , P_MAX_WIDTH, False, rect.width * MCmagnification);
177+
178+ // MCStringFormat(&buffer, "%d", rect.width * MCmagnification);
179+ // sptr->setsprop(P_MAX_HEIGHT, *buffer);
180+ sptr->setintprop (ctxt, 0 , P_MAX_HEIGHT, False, rect.width * MCmagnification);
172181
173- MCStringFormat (&buffer, " %d" , rect.width * MCmagnification);
174- sptr->setsprop (P_MAX_HEIGHT, *buffer);
175182
176183 uint2 ssize = MCU_min (32 , rect.width );
177- MCStringFormat (&buffer, " %d" , ssize * MCmagnification);
178- sptr->setsprop (P_WIDTH, *buffer);
184+ // MCStringFormat(&buffer, "%d", ssize * MCmagnification);
185+ // sptr->setsprop(P_WIDTH, *buffer);
186+ sptr->setintprop (ctxt, 0 , P_WIDTH, False, ssize * MCmagnification);
187+
179188
180189 ssize = MCU_min (32 , rect.height );
181- MCStringFormat (&buffer, " %d" , ssize * MCmagnification);
182- sptr->setsprop (P_HEIGHT, *buffer);
190+ // MCStringFormat(&buffer, "%d", ssize * MCmagnification);
191+ // sptr->setsprop(P_HEIGHT, *buffer);
192+ sptr->setintprop (ctxt, 0 , P_HEIGHT, False, ssize * MCmagnification);
193+
183194
184195 MCRectangle drect = sptr->getrect ();
185196 magrect.width = drect.width / MCmagnification;
0 commit comments