Printing/Exporting from chartsEngine

Get help and support using chartsEngine for LiveCode.

Moderators: heatherlaine, BvG

Post Reply
drOrganized
Posts: 24
Joined: Tue Dec 04, 2007 7:02 pm
Location: Saratoga Springs

Printing/Exporting from chartsEngine

Post by drOrganized » Tue Apr 20, 2010 2:52 am

Is there support for printing a chart without the card background?

How about exporting the graphic as an image?

Thanks,
M~

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Printing/Exporting from chartsEngine

Post by malte » Tue Apr 20, 2010 11:06 am

Hi,

you can use export snapshot from rect to export the chart to an image.

export snapshot from rect (the rect of grp "yourChart" of grp "yourChart" to file "path/to/file" as PNG

hth,

Malte

drOrganized
Posts: 24
Joined: Tue Dec 04, 2007 7:02 pm
Location: Saratoga Springs

Re: Printing/Exporting from chartsEngine

Post by drOrganized » Tue Apr 20, 2010 1:02 pm

Many thanks Malte....!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Printing/Exporting from chartsEngine

Post by FourthWorld » Tue Apr 20, 2010 1:30 pm

With Rev v2.7 the export snapshot command was enhanced to allow you to export an object directly without having to specify its rect, with the dual benefit that the card the object resides on need not be open and if exporting a group the empty area between controls is rendered as transparent - from the Rev Dictionary entry for "export snapshot":
Tip: If the image has an alpha channel, the export snapshot...as PNG form creates a 32-bit PNG file.
If taking a snapshot of an object, the rectangle's coordinates are relative to the top left corner of the card containing the object. The object is rendered into an image as if no other objects existed around it, the snapshot is taken without applying the object's blendlevel or ink. You can take a snapshot of an object regardless of its visibility or open status - in particular, snapshots can be taken of objects that are not on the current card or in stacks that are not open.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

drOrganized
Posts: 24
Joined: Tue Dec 04, 2007 7:02 pm
Location: Saratoga Springs

Re: Printing/Exporting from chartsEngine

Post by drOrganized » Wed Apr 21, 2010 2:54 am

Thank you for helping me with this command...!

Post Reply

Return to “chartsEngine”