Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Object Definition

Method Description

GraphicImage.setPenThickness()

Set pen drawing thickness

Syntax

GraphicImage = GraphicImage.setPenThickness(thickness)

Parameters

The 'GraphicImage.setPenThickness' method takes 1 parameter:

Name Type/Value Range/Length Description
thicknessnumber  Optional, default = 1
The desired thickness (in pixels) of the pen to use

Results

The 'GraphicImage.setPenThickness' method returns GraphicImage:

Type/Value Range/Length Description
GraphicImage   Return a reference to the GraphicImage (to 'this')

Remarks

By default drawing operations such as drawRectangle, use a pen thickness of 1 pixel. This method allows the thickness to be adjusted. The thickness set only applies to this image and remains the same until changed by a sebsequent call to this method.

Example

  // Create an empty 100x100 pixel palette based image
  var img = (new GraphicImage).create(100,100, false);

  // Draw a red square 50x50 pixels with a border thickness of 3 pixels
  var red   = img.colourResolve(255,  0,  0);

  img.setPenThickness(3);
  img.drawRectangle({x:30,y:30},{x:80,y:80},red);
        
Whitebeam release 1.3.36
(loadtime : 22ms)