[Laszlo-dev] how do you scale a view?

Henry Minsky henry.minsky at gmail.com
Fri Oct 21 10:12:19 PDT 2005


Well, the Flash printing API doesn't have anything to do that, except you
can set the _xscale and _yscale on the movieclip before printing it, so
that's what I am going to do.



On 10/21/05, P T Withington <ptw at pobox.com> wrote:
>
> Most print drivers have the ability to arbitrarily transform your
> output on the way to the device, so I wonder why we would need this
> capability in the app?
>
> On 21 Oct 2005, at 12:50, Henry Minsky wrote:
>
> > 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
> > _______________________________________________
> > Laszlo-dev mailing list
> > Laszlo-dev at openlaszlo.org
> > http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
> >
>
>


--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openlaszlo.org/pipermail/laszlo-dev/attachments/20051021/535844b5/attachment.html


More information about the Laszlo-dev mailing list