just fyi If your cursor or another window is over the rect it will show up
in the screenshot.

On Thu, Aug 8, 2024 at 10:23 AM Andreas Bergendal via use-livecode <
use-livecode@lists.runrev.com> wrote:

> That’s good to know! Then it must have been something else I was struggling
> with - perhaps it had to do with getting a snapshot of the content of a
> browser widget…? That would still present problems in certain (all?)
> platforms, right?
>
> tors 8 aug. 2024 kl. 14:39 skrev Mark Waddingham via use-livecode <
> use-livecode@lists.runrev.com>:
>
> > On 2024-08-08 10:22, Jimmieson, Phil via use-livecode wrote:
> > > Hi folks,
> > > I’m experimenting with converting one of my LiveCode iPad Apps into a
> > > web version, to see how well it works, but there’s an issue that seems
> > > to be a deal-breaker. My iPad app takes a screenshot of the LiveCode
> > > stack when the user navigates away from the main card, so that the
> > > image can be used elsewhere in the app. This works fine on iPad, but I
> > > noticed that the web version of the app generates a javascript
> > > exception when I try to leave the main card. On checking the
> > > dictionary, I noticed that the export snapshot command is not listed as
> > > being supported on web. Is this correct? If so, is there an alternative
> > > that will work for web?
> >
> > So 'export snapshot from screen' is not supported - this is the form
> > which takes the pixel data from the actual (composited) screen buffer.
> >
> > However, there is an alternate form which is entirely internal to the
> > engine:
> >
> >     export snapshot from [ rect <rect> of ] <object>
> >
> > To use the internal form for a card you can do:
> >
> >     export snapshot from this card
> >
> > Or if you want a portion of the card:
> >
> >     export snapshot from rect 0,0,100,100 of this card
> >
> > Further there is an `at size <width>,<height>` clause which allows you
> > to specify the size you want the resulting image.
> >
> > The difference here is that the internal form replicates the same
> > process that the engine uses to render objects to a window - it renders
> > the given rectangle of the object into a rect of the specified size (or
> > the size of the rect/object if 'at size' is not specified).
> >
> > In contrast, the 'external' form has to ask the OS for the given
> > rectangle of the actual screen's framebuffer.
> >
> > Hope this helps,
> >
> > Mark.
> >
> > --
> > Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> > LiveCode: Build Amazing Things
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to