CreateImageFromPaint Document Attributes 

Declaration:

FUNCTION   CreateImageFromPaint
(   paint :HANDLE;
    imageName :STRING
) :HANDLE ;

Description:

Creates an image resource from a paint node.

Parameters:

paint Handle to the paint node to be used to create the image resource.
imageName User-specified name to be used to identify the newly created image resource.

Result:

Returns the handle to the newly create image resource if successful; nil otherwise.

Example:

imageHandle := CreateImageFromPaint(paintHandle, 'My Image');



  FFillBack Document Attributes 

Declaration:

PROCEDURE   FFillBack
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure FFillBack returns the current fill background color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

FFillBack(redValue,greenValue,blueValue);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FFillColorByClass Document Attributes 

Declaration:

FUNCTION   FFillColorByClass
:BOOLEAN ;

Description:

Function FFillColorByClass returns whether the global attributes are set to use the fill colors of the default class.

Example:

useClassFillCol:=FFillColorByClass;



  FFillFore Document Attributes 

Declaration:

PROCEDURE   FFillFore
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure FFillFore returns the current fill foreground color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

FFillFore(redValue,greenValue,blueValue);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FFillPat Document Attributes 

Declaration:

FUNCTION   FFillPat
:LONGINT ;

Description:

Function FFillPat returns the current fill pattern setting.

Fill patterns and their associated constants can be found in the VectorScript Appendix.

Example:

currFillStyle:=FFillPat;



  FFPatByClass Document Attributes 

Declaration:

FUNCTION   FFPatByClass
:BOOLEAN ;

Description:

Function FFPatByClass returns whether the global attributes are set to use the fill pattern of the default class.

Example:

useClassFPat:=FFPatByClass;



  FillBack Document Attributes 

Declaration:

PROCEDURE   FillBack
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure FillBack sets the active fill background color setting for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to set as active fill background color.

Example:

FillBack(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FillFore Document Attributes 

Declaration:

PROCEDURE   FillFore
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure FillFore sets the active fill foreground color setting for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to set as active fill foreground color.

Example:

FillFore(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FillPat Document Attributes 

Declaration:

PROCEDURE   FillPat
( patNumber:LONGINT ) ;

Description:

Procedure FillPat sets the active fill pattern for the document. Any objects created after a calling this procedure will use the specified fill pattern.

Fill patterns and their associated constants can be found in the VectorScript Appendix.

Parameters:

patNumber Index of fill pattern to be set as document default.

Example:

Rect(0,0,2,2);
FillPat(21);
Rect(2,2,4,4);



  FLSByClass Document Attributes 

Declaration:

FUNCTION   FLSByClass
:BOOLEAN ;

Description:

Function FLSByClass returns whether the global attributes are set to use the line style of the default class.

Example:

useClassLStyle:=FLSByClass;



  FLWByClass Document Attributes 

Declaration:

FUNCTION   FLWByClass
:BOOLEAN ;

Description:

Function FLWByClass returns whether the global attributes are set to use the line weight of the default class.

Example:

useClassLWidth:=FLWByClass;



  FMarker Document Attributes 

Declaration:

PROCEDURE   FMarker
( VAR  style :INTEGER;
  VAR  size :REAL;
  VAR  ang :INTEGER
) ;

Special Notes:

FMarker is obsolete as of VectorWorks13.0

Description:

Procedure FMarker returns the active marker style parameters.

A complete listing of marker styles can be found in the Appendix

Parameters:

style Returns marker style.
size Returns marker size in inches measured in page space.
ang Returns marker angle (in degrees).

Example:

PROCEDURE Example;
VAR
	style :INTEGER;
	size  :REAL;
	ang   :INTEGER;
BEGIN
	FMarker(style, size, ang);
	Message(style, ' ', size, ' ', ang);
END;
RUN(Example);




  FMarkerByClass Document Attributes 

Declaration:

FUNCTION   FMarkerByClass
:BOOLEAN ;

Description:

Function FMarkerByClass returns whether the global attributes are set to use the arrow style of the default class.

Example:

useClassMarker:=FMarkerByClass;



  FPenBack Document Attributes 

Declaration:

PROCEDURE   FPenBack
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure FPenBack returns the current pen background color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FPenColorByClass Document Attributes 

Declaration:

FUNCTION   FPenColorByClass
:BOOLEAN ;

Description:

Function FPenColorByClass returns whether the global attributes are set to use the pen colors of the default class.

Example:

useClassPenColor:=FPenColorByClass;



  FPenFore Document Attributes 

Declaration:

PROCEDURE   FPenFore
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure FPenFore returns the current pen foreground color of the document. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FPenPat Document Attributes 

Declaration:

FUNCTION   FPenPat
:INTEGER ;

Description:

Function FPenPat returns the active pen pattern setting.

Example:

CurrPenStyle:=FPenPat;



  FPenSize Document Attributes 

Declaration:

FUNCTION   FPenSize
:INTEGER ;

Description:

Function FPenSize returns the active pen size setting (in mils).

Example:

CurrPenSize:=FPenSize;



  GetDashStyle Document Attributes 

Declaration:

FUNCTION   GetDashStyle
(   swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) :INTEGER ;

Description:

Function GetDashStyle searches for the pattern specified by the parameters. If it exists, then the linestyle index associated with the existing dash pattern is returned. If it does not exist, then it is added to the document and the linestyle index associated with the new dash pattern is returned.

Example:

currLS:=GetDashStyle;



  GetDefaultBeginningMarker Document Attributes 

Declaration:

FUNCTION   GetDefaultBeginningMarker
( VAR  style :LONGINT;
  VAR  angle :INTEGER;
  VAR  size :REAL;
  VAR  width :REAL;
  VAR  thicknessBasis :INTEGER;
  VAR  thickness :REAL;
  VAR  visibility :BOOLEAN
) :BOOLEAN ;

Description:

Gets all properties for the document default beginning marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	visibility: BOOLEAN;

	
BEGIN
ok := GetDefaultBeginningMarker (style, angle, size, width, thickBasis, thickness, visibility);
Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness, ' /  ', visibility);	
END;

RUN(Example);

See Also:

GetDefaultEndMarker  



  GetDefaultEndMarker Document Attributes 

Declaration:

FUNCTION   GetDefaultEndMarker
( VAR  style :LONGINT;
  VAR  angle :INTEGER;
  VAR  size :REAL;
  VAR  width :REAL;
  VAR  thicknessBasis :INTEGER;
  VAR  thickness :REAL;
  VAR  visibility :BOOLEAN
) :BOOLEAN ;

Description:

Gets all properties for the document default end marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	visibility: BOOLEAN;

	
BEGIN
ok := GetDefaultEndMarker (style, angle, size, width, thickBasis, thickness, visibility);
Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness, ' /  ', visibility);	
END;

RUN(Example);

See Also:

GetDefaultBeginningMarker  



  GetDefaultOpacity Document Attributes 

Declaration:

PROCEDURE   GetDefaultOpacity
VAR opacity:INTEGER ) ;

Description:

Returns the default opacity.



  GetDocumentDefaultSketchStyle Document Attributes 

Declaration:

FUNCTION   GetDocumentDefaultSketchStyle
:STRING ;

Description:

Returns the document default sketch style. Returns the string 'No Sketch' if the current sketch style is 'No Sketch'.



  GetGradientData Document Attributes 

Declaration:

PROCEDURE   GetGradientData
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  spotPosition :REAL;
  VAR  midpointPosition :REAL;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Gets the spot position, midpoint position and color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

PROCEDURE Example;
VAR
   gradient :HANDLE;
   segmentIndex :INTEGER;
   spotPosition, midpointPosition :REAL;
   red, green, blue :LONGINT;
BEGIN
   gradient := GetObject('Cyan-Magenta-Yellow');
   segmentIndex := 3;
   GetGradientData(gradient, segmentIndex, spotPosition, midpointPosition, red, green, blue);
   Message(red, ' ', green, ' ', blue);
END;
RUN(Example);



  GetGradientMidpointPosition Document Attributes 

Declaration:

PROCEDURE   GetGradientMidpointPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  position :REAL
) ;

Description:

Gets the midpoint position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
position Position of the segment's midpoint relatvie to color spot immediately to left.
(position >= 0.0 and position <= 1.0)

Example:

GetGradientMidpointPosition(gradientHandle, 4, midpointPosition);



  GetGradientSpotColor Document Attributes 

Declaration:

PROCEDURE   GetGradientSpotColor
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Gets the spot color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

GetGradientSpotColor(gradientHandle, 4, red, green, blue);



  GetGradientSpotPosition Document Attributes 

Declaration:

PROCEDURE   GetGradientSpotPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  position :REAL
) ;

Description:

Gets the spot position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
position Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)

Example:

GetGradientSpotPosition(gradientHandle, 4, spotPosition);



  GetNumGradientSegments Document Attributes 

Declaration:

FUNCTION   GetNumGradientSegments
( gradient:HANDLE ) :INTEGER ;

Description:

Gets the number of segments in the gradient.

Parameters:

gradient The gradient from which to get the number of segments.

Result:

Returns the number of segments in the gradient if successful; 0 otherwise.

Example:

numSegments := GetNumGradientSegments(gradientHandle);



  InsertGradientSegment Document Attributes 

Declaration:

FUNCTION   InsertGradientSegment
(   gradient :HANDLE;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) :INTEGER ;

Description:

Inserts a new segment into the gradient and initializes its data to the specified values.

A segment consists of a single color spot and the single midpoint immediately to the right of the color spot.

Parameters:

gradient Gradient into which a segment is to be inserted.
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Result:

Returns the index of the newly created segment; 0 otherwise.

Note: segment indexes begin with 1.

Example:

index := InsertGradientSegment(gradientHandle, 0.35, 0.4, 255, 255, 255);
{ inserts a white color spot at position, 0.35, with a midpoint position of 0.4 }



  IsUserColor Document Attributes 

Declaration:

FUNCTION   IsUserColor
(   ColorIDX :INTEGER;
  VAR  ColorName :DYNARRAY[] of CHAR
) :BOOLEAN ;

Description:

Returns True if the color is a user color.



  Marker Document Attributes 

Declaration:

PROCEDURE   Marker
(   style :INTEGER;
    size :REAL;
    ang :INTEGER
) ;

Special Notes:

Marker is obsolete as of VectorWorks13.0

Description:

Marker defines a marker (arrowhead) style for the document. This marker style becomes the active style for the document.

A complete listing of marker styles can be found in the Appendix

Parameters:

style Marker style constant.
size Marker size in inches measured in page space. Legal values are 0.0 to 2.0.
ang Marker angle.

Example:

Marker(2,0.25,60);



  NumColors Document Attributes 

Declaration:

FUNCTION   NumColors
:INTEGER ;

Description:

Returns the last used color index in the current document.



  NumDashStyles Document Attributes 

Declaration:

FUNCTION   NumDashStyles
:INTEGER ;

Description:

Function NumDashStyles returns the number of available line dash patterns.

Example:

numLS:=NumDashStyles;



  Opacity Document Attributes 

Declaration:

PROCEDURE   Opacity
( opacity:INTEGER ) ;

Description:

Sets the active opacity.



  PenBack Document Attributes 

Declaration:

PROCEDURE   PenBack
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure PenBack set the active pen background color for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to be set as active pen background.

Example:

PenBack(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  PenFore Document Attributes 

Declaration:

PROCEDURE   PenFore
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure PenFore sets the active pen foreground color for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to be set as active pen foreground.

Example:

PenFore(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  PenPat Document Attributes 

Declaration:

PROCEDURE   PenPat
( patNumber:INTEGER ) ;

Description:

Procedure PenPat sets the active pen pattern (line style) for the document.

If patNumber is in the range 0 to 71 the linestyle will be set to the corresponding fill pattern. A value in the range -1 to -8, will set the linestyle to one of the defined Vectorworks linestyles.

Fill patterns and their associated constants can be found in the VectorScript Appendix.


Parameters:

patNumber Pattern/linestyle ID value.

Example:

PenPat(25);
{ uses fill pattern 25 as the active pen pattern }

PenPat(-3);
{ sets a linestyle as the active pen pattern }



  PenSize Document Attributes 

Declaration:

PROCEDURE   PenSize
( lw:INTEGER ) ;

Description:

Procedure PenSize sets the active line weight for the document.

Parameters:

lw Line weight (in mils). Fourteen (14) mils equals one pixel.

Example:

PenSize(28);



  RemoveGradientSegment Document Attributes 

Declaration:

PROCEDURE   RemoveGradientSegment
(   gradient :HANDLE;
    segmentIndex :INTEGER
) ;

Description:

Removes the specified segment from the specified gradient.

Parameters:

gradient Gradient from which to remove a segment.
segmentIndex Index of segment to be removed.
(segment indexes begin with 1)

Example:

RemoveGradientSegment (gradientHandle, 4);
{ removes the segment with index 4 }



  SetDashStyle Document Attributes 

Declaration:

PROCEDURE   SetDashStyle
(   swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) ;

Description:

Procedure SetDashStyle creates a new linestyle in a Vectorworks document. Parameter swt defines whether the linestyle will be scaled with thickness, and parameter numPairs specifies the number of length pairs defining the linestyle.

The linestyle is defined by up to five black/white length pairs, which are specified in parameters b1,w1 through b5,w5. The minimum length of any given black or white parameter is 1 point, or 1/72 of an inch, and the line specification must be in pairs.

Example:

SetDashStyle(True,0,1",1/4",1/4",1/4");



  SetDefaultBeginningMarker Document Attributes 

Declaration:

FUNCTION   SetDefaultBeginningMarker
(   style :LONGINT;
    angle :INTEGER;
    size :REAL;
    width :REAL;
    thicknessBasis :INTEGER;
    thickness :REAL;
    visibility :BOOLEAN
) :BOOLEAN ;

Description:

Sets all properties of the document default beginning marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
BEGIN
	ok := SetDefaultBeginningMarker(2176, 15, 0.5, 0, 0, 2, TRUE);
END;

RUN(Example);

See Also:

SetDefaultEndMarker  



  SetDefaultEndMarker Document Attributes 

Declaration:

FUNCTION   SetDefaultEndMarker
(   style :LONGINT;
    angle :INTEGER;
    size :REAL;
    width :REAL;
    thicknessBasis :INTEGER;
    thickness :REAL;
    visibility :BOOLEAN
) :BOOLEAN ;

Description:

Sets all properties of the document default end marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
BEGIN
	ok := SetDefaultEndMarker(2176, 15, 0.5, 0, 0, 2, TRUE);	
END;

RUN(Example);

See Also:

SetDefaultBeginningMarker  



  SetDefaultOpacity Document Attributes 

Declaration:

PROCEDURE   SetDefaultOpacity
( opacity:INTEGER ) ;

Description:

Sets the default opacity to document.

Parameters:

opacity The opacity as percent value in range [0-100].



  SetDefaultOpacityByClass Document Attributes 

Declaration:

PROCEDURE   SetDefaultOpacityByClass
;

Description:

Sets the default opacity to use the current class opacity.



  SetDocumentDefaultSketchStyle Document Attributes 

Declaration:

FUNCTION   SetDocumentDefaultSketchStyle
( sketchName:STRING ) :BOOLEAN ;

Description:

Sets the document default sketch style. Set sketchName to 'No Sketch' to set the document default sketch to 'No Sketch'.

Parameters:

sketchName Sketch Style name.



  SetGradientData Document Attributes 

Declaration:

PROCEDURE   SetGradientData
(   gradient :HANDLE;
  VAR  segmentIndex :INTEGER;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Description:

Sets the spot position, midpoint position and color of the specified gradient segment.

Note: you must use a variable, initialized to the segment index, to pass as a parameter. After the data has been set, this variable will contain the index of the segment, which may have changed because of the spot position specified.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

segmentIndex := 4;
SetGradientData(gradientHandle, segmentIndex, 0.9, 0.5, 255, 255, 255);



  SetGradientMidpointPosition Document Attributes 

Declaration:

PROCEDURE   SetGradientMidpointPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
    position :REAL
) ;

Description:

Sets the midpoint position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
position Position of the segment's midpoint relatvie to color spot immediately to left.
(position >= 0.0 and position <= 1.0)

Example:

SetGradientMidpointPosition(gradientHandle, 4, 0.6);



  SetGradientSpotColor Document Attributes 

Declaration:

PROCEDURE   SetGradientSpotColor
(   gradient :HANDLE;
    segmentIndex :INTEGER;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Description:

Sets the spot color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

SetGradientSpotColor(gradientHandle, 4, 255, 255, 255);



  SetGradientSpotPosition Document Attributes 

Declaration:

PROCEDURE   SetGradientSpotPosition
(   gradient :HANDLE;
  VAR  segmentIndex :INTEGER;
    position :REAL
) ;

Description:

Sets the spot position of the specified gradient segment.

Note: you must use a variable, initialized to the segment index, to pass as a parameter. After the data has been set, this variable will contain the index of the segment, which may have changed because of the spot position specified.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
position Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)

Example:

SetGradientSpotPosition(gradientHandle, segmentIndex, 0.9);



  SheetNum Document Attributes 

Declaration:

FUNCTION   SheetNum
:INTEGER ;

Description:

Returns the number of sheets contained within the current document.

Result:

The number of sheets.

See Also:

SheetList  



  ShowCreateImageDialog Document Attributes 

Declaration:

FUNCTION   ShowCreateImageDialog
:HANDLE ;

Description:

Displays a dialog that allows the user to select an image file from which a new image resource is created.

Result:

Returns the handle to the newly created image resource if successful; nil otherwise.

Example:

imageHandle := ShowCreateImageDialog;



  ShowGradientEditorDialog Document Attributes 

Declaration:

PROCEDURE   ShowGradientEditorDialog
VAR gradient:HANDLE ) ;

Description:

Displays the gradient editor dialog for the specified gradient.

To create and edit a new gradient resource, pass in a handle variable initialized to nil. If successful, the handle variable will be initialized with the handle to the new gradient resource.

Parameters:

gradient The gradient resource to display in the editor dialog; nil if a new gradient is to be created.

Example:

ShowGradientEditorDialog(gradientHandle);
{ displays the specified gradient resource in the editor }

newGradientHandle := nil;
ShowGradientEditorDialog(newGradientHandle);
{ creates a new gradient resource and displays it in the editor }