Re: Snapshot question

2024-06-05 Thread Craig Newman via use-livecode
Richard.

Intersting stuff.

When one first drags a roundRect from the toolbar, the PI has a field to enter 
a value for the “roundRadius” property. But after a rotation, where the graphic 
is now defined solely by its “points” property, the ability to get or set that 
property disappears. I suppose this makes sense.

And if one sets the roundRadius property to a value greater than the geometry 
of the graphic will allow, that is, the radius of the corners is greater than 
that which will ‘fit” onto the graphic itself, one gets a circle, though 
defined by points as opposed to the usual startAngle and arcAngle.

Craig

> On Jun 4, 2024, at 2:48 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> Craig wrote:
>> The docs must be wrong. I just tested with all seven of the graphic
>> options in the tools palette, and they all rotate just fine.
> 
> I'd guess that Dictionary entry was written before July 7, 2007.
> 
> In the revcommonlibrary script you'll find the revRotatePoly command on lines 
> 496 thru 532, with the comment block above it noting the date it was added.
> 
> On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't 
> innately have a points property.
> 
> On line 525 it changes the style of the target graphic object to polygon if 
> needed.
> 
> Those two changes are not present in the older revRotatePolygonOld command 
> listed just below it.
> 
> --
> Richard Gaskin
> FourthWorld.com
> 
> ___
> 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


Re: Snapshot question

2024-06-04 Thread Neville Smythe via use-livecode


> On 5 Jun 2024, at 2:00 am, Craig wrote:
> 
> The docs must be wrong. I just tested with all seven of the graphic options 
> in the tools palette, and they all rotate just fine.



You are absolutely right, a roundedRect graphic does rotate with revPolyRotate. 
Don’t know why I trusted the docs rather than testing for myself (In my 
defence, I have been thinking more about my later issue of rotating scaled 
images).

Moreover when the graphic is selected the rotated boundary is hilighted rather 
than the bounding box boundary as with a rotated image, which is huge 
advantage. The graphic's label is not rotated, which is a small disadvantage - 
or a feature; I can live with it for my application. So I can now delete a 
hundred or more lines of work-around code.

And Hakan, many thanks, this will be very useful. But who knew!? Which is 
rather my point - perhaps scaling of rotated images was prohibited by default 
just because LC thought developers couldn’t deal with the trigonometry?

So much good stuff from Bernd, Craig and Hakan.


Neville Smythe




___
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


Re: Snapshot question

2024-06-04 Thread Richard Gaskin via use-livecode
Craig wrote:
> The docs must be wrong. I just tested with all seven of the graphic
> options in the tools palette, and they all rotate just fine.

I'd guess that Dictionary entry was written before July 7, 2007.

In the revcommonlibrary script you'll find the revRotatePoly command on lines 
496 thru 532, with the comment block above it noting the date it was added.

On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't 
innately have a points property.

On line 525 it changes the style of the target graphic object to polygon if 
needed.

Those two changes are not present in the older revRotatePolygonOld command 
listed just below it.

--
Richard Gaskin
FourthWorld.com

___
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


Re: Snapshot question

2024-06-04 Thread Craig Newman via use-livecode
The docs must be wrong. I just tested with all seven of the graphic options in 
the tools palette, and they all rotate just fine.

Craig

> On May 31, 2024, at 9:30 PM, Neville Smythe via use-livecode 
>  wrote:
> 
> Many thanks Craig and Bernd for your suggestions
> 
> Craig: Unfortunately the docs say revRotatePoly only works with lines, curves 
> and polygons
> 
> Bernd: Oh! Yes, exporting as png does work to give transparent corner bits! 
> Obvious now!
> 
> I think I had briefly considered this and rejected it because at the time I 
> was conflating the problem with an issue I am going to have later in my 
> project. The roundrect graphics are going to be used as niches for a 
> collection of images: the images should be scaled and rotated to fit the 
> graphic object (or now its png alter-ego). Now while referenced images such 
> as png’s can be rotated (more precisely, have their angle set) they lose 
> their scaling, reverting to their native size; and rotated images cannot be 
> scaled (why?? Rather a strange restriction. I think the graphical engine for 
> LC is showing its age rather badly). Which somehow led me to think I had to 
> use the bitmap form for snapshots. But if I place and scale the original 
> image, then export that as a png,  the exported image should have the 
> required size and so can then be rotated without changing its size. I hope.
> 
> Neville
> 
> 
> ___
> 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


Re: Snapshot question

2024-06-04 Thread Håkan Liljegren via use-livecode
LiveCode refuses to scale rotated images if the angle is set and lockloc is 
false but if you set lockloc to true you can scale the rotated image. If you 
just rotate an image with lockloc set (to true) it will always keep the image 
inside the original bounding box which is normally not what you want. But if 
you want to rotate and keep the same scale you need to calculate the new width 
and height of the image based on the scale factor. But if you have the scale 
factor nd the wanted angle we can, with some trigonometry, calculate the new 
width and height and thus create a function:

constant deg2Rad = pi/180

on rotateAndScaleImage pImgID pDeg pScale
   if pScale is empty then put 1 into pScale
   put the loc of pImgID into tLoc
   put the formattedwidth of pImgID * pScale into tWidth
   put the formattedheight of pImgID * pScale into tHeight
   put pDeg * deg2Rad into tRad
   put abs(sin(tRad)) into tSin
   put abs(cos(tRad)) into tCos
   
   put tWidth * tCos + tHeight * tSin into tNewWidth
   put tWidth * tSin + tHeight * tCos into tNewHeight
   
   lock screen
   set the angle of pImgID to pDeg
   set the width of pImgID to tNewWidth
   set the height of pImgID to tNewHeight
   set the loc of pImgID to tLoc
end rotateAndScaleImage

pImgID is the reference to the image, pDeg is the rotation angle in degrees and 
pScale is the scale factor for the image. E.g.
rotateAndScaleImage the long id of image “MyImage”, 22, 0.5

Will rotate image “MyImage” by 22 degrees at half the original size

NOTE! The function above rotates the image around it’s center and to get the 
function to work the lockloc needs to be set to true

Happy coding!

:-Håkan


> 1 juni 2024 kl. 13:18 skrev Niggemann, Bernd via use-livecode 
> :
> 
> Neville wrote
>> Now while referenced images such as png’s can be 
>> rotated (more precisely, have their angle set) they lose their scaling, 
>> reverting to their native size; and rotated images cannot be scaled (why??
> 
> set the resizeQuality of the image to good or best depending on your image 
> (images get a bit fuzzy when rotated)
> 
> you can resize a rotated image if you set the imageData of the rotated image 
> to the imageData of the rotated image
> 
>  set the angle of image 1 to 15
>  set the imageData of image 1 to the imageData of image 1
> 
> As soon as you set the imageData of the image it is not referenced anymore. 
> But it can be resized.
> 
> I do not know your requirements exactly but if you want to set the angle 
> repeatedly then it is best to store the original (non-rotated) text of the 
> image and do your rotation every time from that starting point.
> 
> i.e. 
> store original
> set angle
> restore to origina
> set next angle
> 
> Examples of rotating and resizing of image can be found in this topic of the 
> Forum (old stuff but still working)
> 
> https://forums.livecode.com/viewtopic.php?f=27=8042
> 
> Kind regards
> Bernd
> ___
> 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


Re: Snapshot question

2024-06-02 Thread Niggemann, Bernd via use-livecode
Neville wrote
Now while referenced images such as png’s can be
rotated (more precisely, have their angle set) they lose their scaling,
reverting to their native size; and rotated images cannot be scaled (why??

set the resizeQuality of the image to good or best depending on your image 
(images get a bit fuzzy when rotated)

you can resize a rotated image if you set the imageData of the rotated image to 
the imageData of the rotated image

 set the angle of image 1 to 15
 set the imageData of image 1 to the imageData of image 1

As soon as you set the imageData of the image it is not referenced anymore. But 
it can be resized.

I do not know your requirements exactly but if you want to set the angle 
repeatedly then it is best to store the original (non-rotated) text of the 
image and do your rotation every time from that starting point.

i.e.
store original
set angle
restore to origina
set next angle

Examples of rotating and resizing of image can be found in this topic of the 
Forum (old stuff but still working)

https://forums.livecode.com/viewtopic.php?f=27=8042

Kind regards
Bernd
___
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


Re: Snapshot question

2024-06-02 Thread Niggemann, Bernd via use-livecode
Neville wrote
> Now while referenced images such as png’s can be 
> rotated (more precisely, have their angle set) they lose their scaling, 
> reverting to their native size; and rotated images cannot be scaled (why?? 

set the resizeQuality of the image to good or best depending on your image 
(images get a bit fuzzy when rotated)

you can resize a rotated image if you set the imageData of the rotated image to 
the imageData of the rotated image

  set the angle of image 1 to 15
  set the imageData of image 1 to the imageData of image 1

As soon as you set the imageData of the image it is not referenced anymore. But 
it can be resized.

I do not know your requirements exactly but if you want to set the angle 
repeatedly then it is best to store the original (non-rotated) text of the 
image and do your rotation every time from that starting point.

i.e. 
store original
set angle
restore to origina
set next angle

Examples of rotating and resizing of image can be found in this topic of the 
Forum (old stuff but still working)

https://forums.livecode.com/viewtopic.php?f=27=8042

Kind regards
Bernd
___
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


Re: Snapshot question

2024-05-31 Thread Neville Smythe via use-livecode
Many thanks Craig and Bernd for your suggestions

Craig: Unfortunately the docs say revRotatePoly only works with lines, curves 
and polygons

Bernd: Oh! Yes, exporting as png does work to give transparent corner bits! 
Obvious now!

I think I had briefly considered this and rejected it because at the time I was 
conflating the problem with an issue I am going to have later in my project. 
The roundrect graphics are going to be used as niches for a collection of 
images: the images should be scaled and rotated to fit the graphic object (or 
now its png alter-ego). Now while referenced images such as png’s can be 
rotated (more precisely, have their angle set) they lose their scaling, 
reverting to their native size; and rotated images cannot be scaled (why?? 
Rather a strange restriction. I think the graphical engine for LC is showing 
its age rather badly). Which somehow led me to think I had to use the bitmap 
form for snapshots. But if I place and scale the original image, then export 
that as a png,  the exported image should have the required size and so can 
then be rotated without changing its size. I hope.

Neville


___
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


Re: Snapshot question

2024-05-31 Thread Craig Newman via use-livecode
AHA, now I remember. Try the “revRotatePoly” command. That seems to work with 
any graphic.

Craig

> On May 31, 2024, at 9:32 AM, Craig Newman via use-livecode 
>  wrote:
> 
> I think that only a “regular” polygon graphic can be rotated by setting its 
> “angle” property.That means that a roundRect or rectangular graphic do not 
> respond at all. LC will not throw an error, and the property sticks, but the 
> arc itself does not change..
> 
> I could be wrong about all this.
> 
> Crig
> 
>> On May 30, 2024, at 9:21 PM, Neville Smythe via use-livecode 
>>  wrote:
>> 
>> I have a need for rotated graphic objects, in particular a roundrect graphic.
>> 
>> Export snapshot from object gives a nice image that can serve in place of 
>> the graphic except that it has black spots at each corner outside the 
>> rounded frame. Which means the image can really only be used against a black 
>> background. 
>> 
>> Ideally the background outside the rounded frame should be transparent, 
>> although I suspect that may not be possible with the bitmap image format 
>> produced. Is there any setting that can fix this (a mask?), or failing that 
>> set the colour of these pixels (I presume the snapshot is actually produced 
>> by rendering the object in a hidden buffer with default black background) .
>> 
>> The alternative solution of producing a screenshot against a background of 
>> the required colour is not practical; it requires displaying the object 
>> against an empty visible region of the screen before taking the screenshot 
>> and therefore an unacceptable flash for the user.
>> 
>> Neville Smythe
>> 
>> 
>> 
>> 
>> ___
>> 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


___
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


Re: Snapshot question

2024-05-31 Thread Craig Newman via use-livecode
I think that only a “regular” polygon graphic can be rotated by setting its 
“angle” property.That means that a roundRect or rectangular graphic do not 
respond at all. LC will not throw an error, and the property sticks, but the 
arc itself does not change..

I could be wrong about all this.

Crig

> On May 30, 2024, at 9:21 PM, Neville Smythe via use-livecode 
>  wrote:
> 
> I have a need for rotated graphic objects, in particular a roundrect graphic.
> 
> Export snapshot from object gives a nice image that can serve in place of the 
> graphic except that it has black spots at each corner outside the rounded 
> frame. Which means the image can really only be used against a black 
> background. 
> 
> Ideally the background outside the rounded frame should be transparent, 
> although I suspect that may not be possible with the bitmap image format 
> produced. Is there any setting that can fix this (a mask?), or failing that 
> set the colour of these pixels (I presume the snapshot is actually produced 
> by rendering the object in a hidden buffer with default black background) .
> 
> The alternative solution of producing a screenshot against a background of 
> the required colour is not practical; it requires displaying the object 
> against an empty visible region of the screen before taking the screenshot 
> and therefore an unacceptable flash for the user.
> 
> Neville Smythe
> 
> 
> 
> 
> ___
> 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


Re: Snapshot question

2024-05-31 Thread Niggemann, Bernd via use-livecode
Export snapshot from object gives a nice image that can serve in place of the
graphic except that it has black spots at each corner outside the rounded
frame

Have you tried as "png"? It should make the black corners transparent.

export snapshot from graphic "g1" to image "iDest" as png

Kind regards
Bernd
___
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


Snapshot question

2024-05-30 Thread Neville Smythe via use-livecode
I have a need for rotated graphic objects, in particular a roundrect graphic.

Export snapshot from object gives a nice image that can serve in place of the 
graphic except that it has black spots at each corner outside the rounded 
frame. Which means the image can really only be used against a black 
background. 

Ideally the background outside the rounded frame should be transparent, 
although I suspect that may not be possible with the bitmap image format 
produced. Is there any setting that can fix this (a mask?), or failing that set 
the colour of these pixels (I presume the snapshot is actually produced by 
rendering the object in a hidden buffer with default black background) .

The alternative solution of producing a screenshot against a background of the 
required colour is not practical; it requires displaying the object against an 
empty visible region of the screen before taking the screenshot and therefore 
an unacceptable flash for the user.

Neville Smythe




___
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


Re: Export snapshot question...

2015-11-08 Thread Richard Gaskin

Richmond wrote:


I wonder if, instead of doing /export snapshot from stack xxx/ you might
not be better doing /export snapshot from card zzz/: my experience
of doing the thing from the stack has not been altogether satisfactory .
. . Oops . . .  haven't tried that since DreamCard 2.6 (remember
that???): just tried /export snapshot from stack xxx/ and it "threw a
bluey", so I don't know what you are doing.

However, /export snapshot from card zzz/ does a perfectly respectable job.


Exporting a rect grabs the specified portion of the screen buffer, which 
will also include anything an external blitted to the window but of 
course is limited to the screen bounds.


Exporting an object will cause the object (and if it's a group or a card 
any interior objects) to be rendered into a new buffer, which will work 
regardless of where the source object is located (even off screen), but 
what an external may paint over the card isn't an object per se so LC's 
rendering engine has no way to create that when it generates into its 
buffer.


If the external could be modified to use an image object as its output 
you'd have all sorts of flexibility for handling it.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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


Re: Export snapshot question...

2015-11-08 Thread Paul Dupuis
On 11/8/2015 4:39 PM, Richard Gaskin wrote:
> Richmond wrote:
>
>> I wonder if, instead of doing /export snapshot from stack xxx/ you might
>> not be better doing /export snapshot from card zzz/: my experience
>> of doing the thing from the stack has not been altogether satisfactory .
>> . . Oops . . .  haven't tried that since DreamCard 2.6 (remember
>> that???): just tried /export snapshot from stack xxx/ and it "threw a
>> bluey", so I don't know what you are doing.
>>
>> However, /export snapshot from card zzz/ does a perfectly respectable
>> job.
>
> Exporting a rect grabs the specified portion of the screen buffer,
> which will also include anything an external blitted to the window but
> of course is limited to the screen bounds.
>
> Exporting an object will cause the object (and if it's a group or a
> card any interior objects) to be rendered into a new buffer, which
> will work regardless of where the source object is located (even off
> screen), but what an external may paint over the card isn't an object
> per se so LC's rendering engine has no way to create that when it
> generates into its buffer.

Unfortunately, this also is true.

export snapshot from rect tRect to image tImage as PNG
export snapshot from rect tRect of window tWindowID to image tImage as PNG
export snapshot from window tWindowID to image tImage as PNG

all are effectively the same. They capture the output of the External in
the window, including a certain amount of the window that may be "off
screen" below the bottom. But if any of the window is off the top of the
screen or after some small buffer below the bottom of my screen - every
thing outside of the screen buffer fails to be captured in the export.

export snapshot from this card of stack tStack to image tImage as PNG
export snapshot from rect tRect of this card of stack tStack to image
tImage as PNG

also both work the same in that NONE of the content rendered by the
External is captured.

>
> If the external could be modified to use an image object as its output
> you'd have all sorts of flexibility for handling it.
>
Very true, and so this is now the plan to add image support to the external.
FYI Richard, this is the long-in-the-works PDF external, which is
finally turning out to be pretty slick. Recently migrated from Foxit's
overpriced PDF SDK to Google's open source PDFium, eliminating Foxit
licensing costs and royalty fees.


___
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


Export snapshot question...

2015-11-07 Thread Paul Dupuis
I am using the "export snapshot from rect tRect to ... " for of the
export snapshot command to export the interior of a stack window where
and External has drawn in the window. tRect is set to the global
(screen) coordinates of the interior area of the window based on its
current position.

This works fine. I get a resulting image that is exactly what I am
seeing on screen.

Now I have experimented with move the stack off-screen so that I can
capture the image without the user seeing the window. I have discovered
that if a portion of the window is visible, but say, extends off the
bottom of the screen, and my coordinates in tRect encompass the area
both on and off screen, the image is created just fine.

However, if the whole window is off screen, for example by setting the
topLeft of the window to -5000,-5000 or to 5000,5000, then the export
snapshot command throw and execution error that there is nothing to
snapshop.

Has anyone else run into this issue with export snapshot using screen
coordinates? Is there some reason why export snapshot should not be able
to take a snapshop of something rendered "off-screen"? Is this a known
export snapshop issue? I could not find an applicable bug entry for this
behavior.

I am using LC6.7.6 under Windows 8.1



___
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


Re: Export snapshot question...

2015-11-07 Thread Paul Hibbert
Yes this is the expected behaviour. Export snapshot from rect is not be able to 
take a snapshot of something "off-screen” because it’s not rendered by the 
display.

Export snapshot from rect uses the device's display output to render the image, 
but if you use Export snapshot of an object (stack, card, group etc.), then the 
LC engine renders the image, so you can take a snapshot of a stack that is 
off-screen this way. I hope that makes sense!

Paul

> On Nov 7, 2015, at 10:15 AM, Paul Dupuis  wrote:
> 
> I am using the "export snapshot from rect tRect to ... " for of the
> export snapshot command to export the interior of a stack window where
> and External has drawn in the window. tRect is set to the global
> (screen) coordinates of the interior area of the window based on its
> current position.
> 
> This works fine. I get a resulting image that is exactly what I am
> seeing on screen.
> 
> Now I have experimented with move the stack off-screen so that I can
> capture the image without the user seeing the window. I have discovered
> that if a portion of the window is visible, but say, extends off the
> bottom of the screen, and my coordinates in tRect encompass the area
> both on and off screen, the image is created just fine.
> 
> However, if the whole window is off screen, for example by setting the
> topLeft of the window to -5000,-5000 or to 5000,5000, then the export
> snapshot command throw and execution error that there is nothing to
> snapshop.
> 
> Has anyone else run into this issue with export snapshot using screen
> coordinates? Is there some reason why export snapshot should not be able
> to take a snapshop of something rendered "off-screen"? Is this a known
> export snapshop issue? I could not find an applicable bug entry for this
> behavior.
> 
> I am using LC6.7.6 under Windows 8.1
> 
> 
> 
> ___
> 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

Re: Export snapshot question...

2015-11-07 Thread Paul Dupuis
On 11/7/2015 1:46 PM, Paul Hibbert wrote:
> Yes this is the expected behaviour. Export snapshot from rect is not be able 
> to take a snapshot of something "off-screen” because it’s not rendered by the 
> display.
>
> Export snapshot from rect uses the device's display output to render the 
> image, but if you use Export snapshot of an object (stack, card, group etc.), 
> then the LC engine renders the image, so you can take a snapshot of a stack 
> that is off-screen this way. I hope that makes sense!

Thank you.

My problem is that I am using a custom external that places content
generated by the external in to the stack window (via the windowID of
the stack that I pass to the external). If I do export snapshot of stack
xxx, the content placed in the stack window by the external is not
recognized and included in the resulting image.

We may have to have the external modified to return an optional image
that we can place on a stack for printing.

___
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

Re: Export snapshot question...

2015-11-07 Thread Paul Hibbert

> On Nov 7, 2015, at 4:46 PM, Paul Dupuis  wrote:
> 
> On 11/7/2015 1:46 PM, Paul Hibbert wrote:
>> Yes this is the expected behaviour. Export snapshot from rect is not be able 
>> to take a snapshot of something "off-screen” because it’s not rendered by 
>> the display.
>> 
>> Export snapshot from rect uses the device's display output to render the 
>> image, but if you use Export snapshot of an object (stack, card, group 
>> etc.), then the LC engine renders the image, so you can take a snapshot of a 
>> stack that is off-screen this way. I hope that makes sense!
> 
> Thank you.
> 
> My problem is that I am using a custom external that places content
> generated by the external in to the stack window (via the windowID of
> the stack that I pass to the external). If I do export snapshot of stack
> xxx, the content placed in the stack window by the external is not
> recognized and included in the resulting image.
> 
> We may have to have the external modified to return an optional image
> that we can place on a stack for printing.

That does sound like a more complex problem. Modifying the external sounds like 
the best option, unless anybody else has any tricks.

Paul
___
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

Re: Export snapshot question...

2015-11-07 Thread J. Landman Gay

On 11/7/2015 10:59 PM, Paul Hibbert wrote:



On Nov 7, 2015, at 4:46 PM, Paul Dupuis 
wrote:

On 11/7/2015 1:46 PM, Paul Hibbert wrote:

Yes this is the expected behaviour. Export snapshot from rect is
not be able to take a snapshot of something "off-screen” because
it’s not rendered by the display.

Export snapshot from rect uses the device's display output to
render the image, but if you use Export snapshot of an object
(stack, card, group etc.), then the LC engine renders the image,
so you can take a snapshot of a stack that is off-screen this
way. I hope that makes sense!


Thank you.

My problem is that I am using a custom external that places
content generated by the external in to the stack window (via the
windowID of the stack that I pass to the external). If I do export
snapshot of stack xxx, the content placed in the stack window by
the external is not recognized and included in the resulting
image.

We may have to have the external modified to return an optional
image that we can place on a stack for printing.


That does sound like a more complex problem. Modifying the external
sounds like the best option, unless anybody else has any tricks.


I wonder if it would be possible to pass the window ID of a hidden stack?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


___
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