Graphics
Previous Topic  Next Topic 

Product

Graphics

Manufacturer

Standard Satellite Forms component

Website

http://www.satelliteforms.net/

Source code provided

Yes

Platform

PalmOS

Sample project(s)

GraphicsApp, SFX Controls

Keywords

graphics


Graphics is a plugin extension that can be used to manipulate and draw graphics within your applications.


Parameters


  Colors are defined as follows:

                        Black                            0

                        Gray                             1

                        White                            2

                        Transparent                   3  

                        Invert                             4


  Font styles are defined as follows:

                        stdFont                         0

                        boldFont                        1

                        largeFont                       2

                        symbolFont                   3

                        symbol11Font                4

                        symbol7Font                 5

                        ledFont                         6


Scripts API


The following methods are accessible from the scripting language.  Note that these are all public methods.  All the methods here are public unless mentioned otherwise.


Usage:  Public Method:  [Name of method]

          Private Method:  [Name of extension].[Name of method]

Example of usage:  Public Method:  EditExSetInsertion(MainParagraphIndex, 0)

                         Private Method:  Extensions(“Graphics”).About()



About()

Private method that shows the extension's about box.


DrawBar(integer, integer, integer, integer)

Draw (bar graph w/fill) bar: Bottom Length  = X,Y; Width  = W, and Height = H.

Example of usage:  DrawBar(X, Y, W, H)


DrawCircle(integer, integer, integer)

Draws Circle using curr. Pen & Fill.  Center = X0, Y0 and  Radius = R 

Example of usage:  DrawCircle(X0, Y0, R)


DrawRect(integer, integer, integer, integer)

Draws Rectangle using curr. Pen & Fill. 

Example of usage:  DrawRect(X0, Y0, X1, Y1)


DrawLine(integer, integer, integer, integer)

Draws a line using current pen color.

Example of usage:  DrawLine(X0, Y0, X1, Y1)


DrawRoundedRect(integer, integer, integer, integer, integer)

Draws rounded rectangle with a corner radius determined by the R parameter. 

Example of usage:  DrawRoundedRect(X0, Y0, X1, Y1, R)


DrawText(string, integer, integer)

Draws the specified text at starting at the specified point. 

Example of usage:  DrawText(“I’m here”, 50, 60)


EraseBar(integer, integer, integer, integer)

Erases Above (same parameters).


EraseCircle(integer, integer, integer)

Erases circle (always erases inside).  Center = X0, Y0; Radius = R. 

Example of usage:  See DrawCircle.


EraseLine(integer, integer, integer, integer)

Erases line  

Example of usage:  EraseLine(X0, Y0, X1, Y1)


EraseRect(integer, integer, integer, integer)

Erases Rectangle (if FillColor = Transparent, skips inside erasure). 

Example of usage:  See DrawRect.


EraseText(string, integer, integer)

Erases text as drawn in DrawText (same params).


GetFillColor()

Gets the fill (inside) color. 

Example of usage:  n = GetFillColor()


GetPenColor()

Gets the pen (border) color. 

Example of usage:  n = GetPenColor()


InvertText(string, integer, integer)

Write text with opposite colors of the current text colors.

Example of usage:  InvertText(“I’m here”, 50, 60)


SetFillColor(integer)

Set the pen (inside) color. 

Example of usage:  SetFillColor(Color)


SetFont(integer)

Sets font style for DrawText 

Parameters:

0          stdFont

1          boldFont

2          largeFont

3          symbolFont

4          symbol1Font

5          symbol7Font

6          ledFont


SetPattern(integer, integer, integer, integer)

Sets 8x8 Custom Fill Pattern: Integers P0, P1, P2, and P3 create a bitmap.


SetPenColor(integer)

Sets the Pen (border) Color. 

Example of usage:  SetPenColor(Color)



DocID: 10149  DocDate: 2005-07-18