SaveInk – PB Docs 150

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]

Argument

Description

dwcontrol

A reference to a DataWindow control.

name

The name of the InkPicture control from
which you want to save the ink.

rownumber

The number of the row that contains the
ink to be saved.

blob

The name of a blob passed by reference
that will hold the ink in the control.

filename

A string containing the name and location
of a file that will hold the ink in the control.

format (optional)

A value of the InkPersistenceFormat enumerated
variable that specifies the format in which you want to save the
ink. Values are:

  • Base64GIFFormat!

  • Base64InkSerializedFormat!

  • GIFFormat!

  • InkSerializedFormat! (default)

mode (optional)

A value of the InkCompressionMode enumerated
variable that specifies the compression mode in which you want to
save the ink. Values are:

  • DefaultCompression!
    (default)

  • MaximumCompression!

  • NoCompression!

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:

The following example saves the ink in an InkPicture
control in row 5 of a DataWindow object into a GIF file with maximum
compression:

The following example saves the ink in an InkPicture
control in the current row of a DataWindow object into a blob:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x