[Laszlo-dev] how do you scale a view?
Henry Minsky
henry.minsky at gmail.com
Fri Oct 21 09:50:22 PDT 2005
Note, for this special case, I could try to smash the scales directly on the
view's movieclip, and then restore them (or not bother if this was an
offscreen view). I was just trying to figure out how to do it without going
down to the MovieClip API.
var mc = myview.getMCRef();
var sx = mc._xscale;
var sy = mc._yscale;
mc._xscale = 50;
mc._yscale = 50;
printjob.addPage(mc, {xMin: 0, yMin: 0, xMax: 1024, yMax: 100000},
{printAsBitmap: false}));
mc._xscale = sx;
mc._yscale = sy;
On 10/21/05, Henry Minsky <henry.minsky at gmail.com> wrote:
>
> Does that work for a view which doesn't directly contain a resource, but
> contains subviews?
>
> I am asking because for printing, I need to take a view which contains
> some child text views, and ultimately set the _xscale and _yscale on it's
> movieclip, in order to get it to
> show up the proper size in the output page. So what I am asking is what
> LFC calls will have the final effect of setting the _xscale and _yscale on a
> view's movieclip?
>
>
>
> On 10/21/05, Adam Wolff <adam at laszlosystems.com> wrote:
> >
> > You want width="${ unstretchedwidth/2 }"
> >
> > This might help:
> > http://www.laszlosystems.com/~adam/blog/archives/000014.html<http://www.laszlosystems.com/%7Eadam/blog/archives/000014.html>
> >
> > A
> >
> > On Oct 21, Henry Minsky wrote:
> >
> > > OK, I'm confused. I just want to scale a view, making it half the
> > width and
> > > height. What is the API for this? The docs say setXScale is
> > deprecated, use
> > > "unstretchedwidth", but I don't know what that means.
> > >
> > >
> > >
> > > --
> > > Henry Minsky
> > > Software Architect
> > > hminsky at laszlosystems.com
> > >
> >
>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
>
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openlaszlo.org/pipermail/laszlo-dev/attachments/20051021/0ee32bb4/attachment-0001.html
More information about the Laszlo-dev
mailing list