BPS Script API  2.24.4
bps::Pen Class Reference

A wrapper for QPen. More...

Public Types

enum  PenCapStyle { FlatCap = 0 , SquareCap = 0x10 , RoundCap = 0x20 }
 Pen cap styles. More...
 
enum  PenJoinStyle { MiterJoin = 0 , BevelJoin = 0x40 , RoundJoin = 0x80 , SvgMiterJoin = 0x100 }
 Pen join styles. More...
 
enum  PenStyle { NoPen = 0 , SolidLine = 1 , DashLine = 2 , DotLine = 3 , DashDotLine = 4 , DashDotDotLine = 5 }
 Pen styles. More...
 

Public Member Functions

 Pen ()
 Default constructor.
 
String toString () const
 

Properties

Brush brush
 The pen brush. More...
 
PenCapStyle capStyle
 The pen cap style. More...
 
Color color
 The pen color. More...
 
Boolean cosmetic
 Pen is cosmetic. More...
 
PenJoinStyle joinStyle
 The pen join style. More...
 
Number miterLimit
 The miter limit. More...
 
PenStyle style
 The pen style. More...
 
Number width
 The pen width. More...
 

Detailed Description

A wrapper for QPen.

Example use within a report:

// change rectangle pen
var p = section.item('rect').pen; // copy current
p.color = new bps.Color(200,100,20);
p.style = bps.Pen.DashDotLine;
section.item('rect').pen = p; // set new pen
A wrapper for QColor.
Definition: bps.Color.js:13
A wrapper for QPen.
Definition: bps.Pen.js:16
@ DashDotLine
Alternate dots and dashes.
Definition: bps.Pen.js:66
The bps extension is a namespace assembling general BPS properties and functions.
Definition: bps.AsyncIO.js:1

Member Enumeration Documentation

◆ PenCapStyle

Pen cap styles.

Enumerator
FlatCap 

A square line end that does not cover the end point of the line.

SquareCap 

A square line end that covers the end point and extends beyond it by half the line width.

RoundCap 

A rounded line end.

◆ PenJoinStyle

Pen join styles.

Enumerator
MiterJoin 

The outer edges of the lines are extended to meet at an angle, and this area is filled.

BevelJoin 

The triangular notch between the two lines is filled.

RoundJoin 

A circular arc between the two lines is filled.

SvgMiterJoin 

A miter join corresponding to the definition of a miter join in the SVG 1.2 Tiny specification.

◆ PenStyle

Pen styles.

Enumerator
NoPen 

No line at all.

SolidLine 

A plain line.

DashLine 

Dashes separated by a few pixels.

DotLine 

Dots separated by a few pixels.

DashDotLine 

Alternate dots and dashes.

DashDotDotLine 

One dash, two dots, one dash, two dots.

Member Function Documentation

◆ toString()

String bps::Pen::toString ( ) const
Returns
Returns "Pen"

Property Documentation

◆ brush

Brush bps::Pen::brush
readwrite

The pen brush.

 

◆ capStyle

PenCapStyle bps::Pen::capStyle
readwrite

The pen cap style.

 

◆ color

Color bps::Pen::color
readwrite

The pen color.

 

◆ cosmetic

Boolean bps::Pen::cosmetic
readwrite

Pen is cosmetic.

 

◆ joinStyle

PenJoinStyle bps::Pen::joinStyle
readwrite

The pen join style.

 

◆ miterLimit

Number bps::Pen::miterLimit
readwrite

The miter limit.

 

◆ style

PenStyle bps::Pen::style
readwrite

The pen style.

 

◆ width

Number bps::Pen::width
readwrite

The pen width.

 


The documentation for this class was generated from the following file: