SaveInk method (DataWindows)
Description
Saves overlay ink to a file or blob from an InkPicture control.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control |
Syntax
[PowerBuilder]
1 |
integer <span>dwcontrol</span>.<span>SaveInk</span> ( string <span>name</span>, long <span>rownumber</span>, blob <span>blob</span> )<br>integer <span>dwcontrol</span>.<span>SaveInk</span> ( string <span>name</span>, long <span>rownumber</span>, <br> string <span>filename</span> {, inkpersistenceformat <span>format </span>{,<br> inkcompressionmode <span>mode</span> } } ) |
1 |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control. |
name |
The name of the InkPicture control from |
rownumber |
The number of the row that contains the |
blob |
The name of a blob passed by reference |
filename |
A string containing the name and location |
format (optional) |
A value of the InkPersistenceFormat enumerated
|
mode (optional) |
A value of the InkCompressionMode enumerated
|
Return Values
Integer. Returns 1 for success and –1
for failure.
Usage
Use the SaveInk method to save annotations
made to an image in an InkPicture control in a DataWindow to a separate
file or blob.
When you save ink to a blob, it is saved in Ink Serialized
Format (ISF). Saving ink to a blob provides the best performance
because the ink is read directly from the ink data cache.
InkSerializedFormat! provides the most compact persistent
ink representation. This format can be embedded inside a binary
document format or added to the clipboard. Base64InkSerializedFormat!
encodes the ISF format as a base64 stream, which allows the ink
to be encoded in an XML or HTML file.
GIFFormat! saves the image in a Graphics Interchange Format
(GIF) file in which ISF is embedded as metadata. This format can
be viewed in applications that are not ink enabled. Base64GIFFormat!
is persisted by using a base64 encoded fortified GIF. Use this format
if the ink is to be encoded directly in an XML or XHTML file and
will be converted to an image at a later time. It supports XSLT
transformations to HTML.
Examples
The following example saves the ink in an InkPicture
control in row 3 of a DataWindow object into an ISF file with default
compression:
1 |
int li_return<br>string ls_pathname, ls_filename<br> <br>GetFileSaveName("Save As", ls_pathname, & <br> ls_filename, "ISF")<br>li_return = dw_1.SaveInk("inkpic_1", 3, ls_pathname) |
The following example saves the ink in an InkPicture
control in row 5 of a DataWindow object into a GIF file with maximum
compression:
1 |
int li_return<br>string ls_pathname, ls_filename<br> <br>GetFileSaveName("Save As", ls_pathname, & <br> ls_filename, "GIF")<br>li_return = dw_1.SaveInk("inkpic_1", 5, & <br> ls_pathname, GIFFormat!, MaximumCompression!) |
The following example saves the ink in an InkPicture
control in the current row of a DataWindow object into a blob:
1 |
int li_return<br>blob lb_blob<br> <br>li_return = dw_1.SaveInk("inkpic_1", &<br> dw_1.GetRow(), lb_blob) |