Mill #6 Documentation Registry
Home
Code Documentation
cartesiacartesia-jscodocpeppermillpixmillpixmill-jswebfxxapi
PixMill Color Tables
NCSReseneW3C

Documentation Registry @ Mill #6

Announcement: Under Construction!

Code Documentation

Code developed by Mill #6 has been documented using their own codoc utility. The following documentation sets are on this site:

  • cartesia
  • cartesia-js
  • codoc
  • peppermill
  • pixmill
  • pixmill-js
  • webfx
  • xapi

PixMill Color Tables

The PixMill libraries, both Ruby and JS versions, define named color tables for use in UI code for their respective languages.

  • NCS
  • Resene
  • W3C
Gem Documentation Page
Cartesia: 2D Geometry Operations (1.4.3)
Overview
Cartesia (module)
Cartesia::Angle (class)
Cartesia::Arc ( ← Cartesia::Circle)
Cartesia::Bezier (class)
Cartesia::Catenary (class)
Cartesia::ChainWrap (class)
Cartesia::Circle (class)
Cartesia::HexCoordinateSystem (class)
Cartesia::HexGeometry (class)
Cartesia::Hexagon (class)
Cartesia::Line (class)
Cartesia::Point (class)
Cartesia::Polygon (class)
Cartesia (class)

Overview

Common 2D Geometry Functions and Classes

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/angle.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/arc.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/bezier.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/catenary.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/chainwrap.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/circle.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/hexcoordinatesystem.rbRubyKenneth F. GuerinCopyright © 2022-2024, Kenneth F. Guerin, all rights reserved.
lib/cartesia/hexgeometry.rbRubyKenneth F. GuerinCopyright © 2022-2024, Kenneth F. Guerin, all rights reserved.
lib/cartesia/line.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/point.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/polygon.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
Copyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/singletons.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
ext/cartesia/bezier.cCKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.
ext/cartesia/cartesia.hCKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.
ext/cartesia/circle.cCKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.
ext/cartesia/ellipse.cCKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.
ext/cartesia/extconf.hCKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.
ext/cartesia/extconf.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
ext/cartesia/init.cCKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.
ext/cartesia/point.cCKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.
ext/cartesia/singletons.cCRubyKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.
ext/cartesia/utils.cCKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.

Contents Directory

Objects
M Cartesia
C Cartesia::Angle
C Cartesia::Arc ← Cartesia::Circle
C Cartesia::Bezier
C Cartesia::Catenary
C Cartesia::ChainWrap
C Cartesia::Circle
C Cartesia::HexCoordinateSystem
C Cartesia::HexGeometry
C Cartesia::Hexagon
C Cartesia::Line
C Cartesia::Point
C Cartesia::Polygon
C Cartesia
Constants & Methods
• angle! (Cartesia)
• cp2pt (Cartesia)
• cpv2pts (Cartesia)
• d2angle (Cartesia)
• is_valid_coordinate_pair? (Cartesia)
• new_arc_from_circle (Cartesia)
• new_line_segment (Cartesia)
• new_rect (Cartesia)
• new_square (Cartesia)
• point! (Cartesia)
• points! (Cartesia)
• r2angle (Cartesia)
• s2angle (Cartesia)
• + (Cartesia::Angle)
• - (Cartesia::Angle)
• < (Cartesia::Angle)
• <= (Cartesia::Angle)
• == (Cartesia::Angle)
• > (Cartesia::Angle)
• >= (Cartesia::Angle)
• add (Cartesia::Angle)
• add! (Cartesia::Angle)
• clamp! (Cartesia::Angle)
• degrees (Cartesia::Angle)
• delta (Cartesia::Angle)
• delta! (Cartesia::Angle)
• difference (Cartesia::Angle)
• reflect_around_pi (Cartesia::Angle)
• reflect_around_pi! (Cartesia::Angle)
• reflect_toward_zero (Cartesia::Angle)
• reflect_toward_zero! (Cartesia::Angle)
• sectons (Cartesia::Angle)
• set (Cartesia::Angle)
• to_s (Cartesia::Angle)
• u2r (Cartesia::Angle) <private>
• intersection_from_line (Cartesia::Arc)
• to_s (Cartesia::Arc)
• e_points (Cartesia::Bezier)
• is_valid? (Cartesia::Bezier)
• length (Cartesia::Bezier)
• t_points (Cartesia::Bezier)
• calc_a_give_dxphi (Cartesia::Catenary) <private>
• calc_a_give_dydx (Cartesia::Catenary) <private>
• calc_a_give_dyphi (Cartesia::Catenary) <private>
• ct_first (Cartesia::Catenary)
• ct_next (Cartesia::Catenary)
• ct_track_point (Cartesia::Catenary) <private>
• dy_at_dx (Cartesia::Catenary)
• dy_at_dx (Cartesia::Catenary)
• finish_curve_tracking (Cartesia::Catenary)
• phi_at_dx (Cartesia::Catenary)
• phi_at_dy (Cartesia::Catenary)
• s_at_dx (Cartesia::Catenary)
• s_at_dy (Cartesia::Catenary)
• start_curve_tracking (Cartesia::Catenary)
• to_s (Cartesia::Catenary)
• tracking? (Cartesia::Catenary)
• != (Cartesia::Circle)
• == (Cartesia::Circle)
• bounding_box (Cartesia::Circle)
• closest_intersection_point_from_point (Cartesia::Circle)
• distance_from_point (Cartesia::Circle)
• get_chord_angle_by_length (Cartesia::Circle)
• get_chord_length_by_angle (Cartesia::Circle)
• get_chord_length_by_nsegs (Cartesia::Circle)
• get_chord_points_by_len (Cartesia::Circle)
• get_chord_points_by_n (Cartesia::Circle)
• get_point (Cartesia::Circle)
• get_tangent_line_between_circles (Cartesia::Circle)
• get_tangent_vectors (Cartesia::Circle)
• intersection_with_circle (Cartesia::Circle)
• intersection_with_line (Cartesia::Circle)
• is_point_inside? (Cartesia::Circle)
• to_s (Cartesia::Circle)
• coord_delta (Cartesia::HexCoordinateSystem) <private>
• each (Cartesia::HexCoordinateSystem)
• each_point_along_edge_axis (Cartesia::HexCoordinateSystem)
• is_constrained? (Cartesia::HexCoordinateSystem) <private>
• is_edge_point? (Cartesia::HexCoordinateSystem)
• nv_at_e (Cartesia::HexCoordinateSystem)
• point_at (Cartesia::HexCoordinateSystem)
• rotated_point (Cartesia::HexCoordinateSystem)
• ee2vv (Cartesia::HexGeometry)
• get_vertex_offsets (Cartesia::HexGeometry)
• vv2ee (Cartesia::HexGeometry)
• height (Cartesia::Hexagon)
• width (Cartesia::Hexagon)
• closest_intersection_point_from_point (Cartesia::Line)
• distance_from_point (Cartesia::Line)
• intersection_point (Cartesia::Line)
• length (Cartesia::Line)
• point_at_dx (Cartesia::Line)
• point_at_dy (Cartesia::Line)
• point_at_x (Cartesia::Line)
• point_at_y (Cartesia::Line)
• split (Cartesia::Line)
• to_ary (Cartesia::Line)
• to_s (Cartesia::Line)
• != (Cartesia::Point)
• == (Cartesia::Point)
• bearing_from (Cartesia::Point)
• bearing_to (Cartesia::Point)
• distance_from (Cartesia::Point)
• dxy_to (Cartesia::Point)
• move_to! (Cartesia::Point)
• new_point_from (Cartesia::Point)
• new_point_rotated_from (Cartesia::Point)
• new_point_using_dxy (Cartesia::Point)
• rotate_around! (Cartesia::Point)
• set (Cartesia::Point)
• to_ary (Cartesia::Point)
• to_s (Cartesia::Point)
• append_point (Cartesia::Polygon)
• append_points (Cartesia::Polygon)
• closest_intersection_point_from_point (Cartesia::Polygon)
• delete_point_at (Cartesia::Polygon)
• distance_from_point (Cartesia::Polygon)
• gen_line_segments (Cartesia::Polygon) <private>
• insert_point (Cartesia::Polygon)
• insert_points (Cartesia::Polygon)
• is_point_inside? (Cartesia::Polygon)
• pt_distance_info (Cartesia::Polygon) <private>
• to_s (Cartesia::Polygon)
• clamp_angle (Cartesia)
• clamp_angle_to_pi (Cartesia)
• d2r (Cartesia)
• d2s (Cartesia)
• distance_from (Cartesia)
• dxybearing (Cartesia)
• dxydab (Cartesia)
• dxydistance (Cartesia)
• r2d (Cartesia)
• r2s (Cartesia)
• s2d (Cartesia)
• s2r (Cartesia)

Module: Cartesia

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/angle.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/arc.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/bezier.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/catenary.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/chainwrap.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/circle.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/hexcoordinatesystem.rbRubyKenneth F. GuerinCopyright © 2022-2024, Kenneth F. Guerin, all rights reserved.
lib/cartesia/hexgeometry.rbRubyKenneth F. GuerinCopyright © 2022-2024, Kenneth F. Guerin, all rights reserved.
lib/cartesia/line.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/point.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/polygon.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
Copyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
lib/cartesia/singletons.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This module handles 2D geometric calculations.

Singleton Registry

Item
Attributes
angle!(angle) → Angle
-
cp2pt(cp) → Point
-
cpv2pts(cps) → Array<Point>
-
d2angle(d) → Angle
-
is_valid_coordinate_pair?(ary) → Boolean
-
new_arc_from_circle(circle, bearing_slice) → Arc
-
new_line_segment(reference, endpt) → Line
-
new_rect(point, width, height) → Polygon
-
new_square(point, size) → Polygon
-
point!(pt) → Point
-
points!(pt) → Array<Point>
-
r2angle(r) → Angle
-
s2angle(s) → Angle
-

Singleton Details

angle!(angle) → Angle

Check and/or convert an angle to a Cartesia::Angle

Parameters:

  • angle [Numeric or Angle] — the incoming angle arg

Returns:

  • [Angle] — a Cartesia::Angle object

cp2pt(cp) → Point

Construct a Point from a 2-element array of coordinates.

Parameters:

  • cp [Array<Numeric>] — the coordinate pair

Returns:

  • [Point] — the Cartesia::Point object

cpv2pts(cps) → Array<Point>

Construct an array of Points from an array of coordinates.

Parameters:

  • cps [Array<Numeric>] — the numeric coordinates

Returns:

  • [Array<Point>] — the array of Cartesia::Points

d2angle(d) → Angle

Construct an Angle instance from a degree angle measurement.

Parameters:

  • d [Numeric] — the angle in degrees

Returns:

  • [Angle] — a Cartesia::Angle instance

is_valid_coordinate_pair?(ary) → Boolean

Checks to see if an array is a valid coordinate pair

Parameters:

  • ary [Array<Numeric>] — the coordinate pair array

Returns:

  • [Boolean] — true if the array is composed of 2 numeric elements

new_arc_from_circle(circle, bearing_slice) → Arc

Construct an Arc from a Circle and a bearing slice.

Parameters:

  • circle [Circle] — the circle of which the resulting arc is a segment
  • bearing_slice [Array<Numeric>] — a 2-element array of angles defining the slice of the circle

Returns:

  • [Arc] — the Cartesia::Arc instance

new_line_segment(reference, endpt) → Line

Constructs a line segment from two coordinate pairs

Parameters:

  • reference [Array<Numeric>] — the reference point of the line segment
  • endpt [Array<Numeric>] — the end point of the line segment

Returns:

  • [Line] — the new line segment

new_rect(point, width, height) → Polygon

Construct a rectangular Polygon from a Point and the width and height dimensions

Parameters:

  • point [Point] — the upper left point of the rectangle
  • width [Numeric] — the width of the rectangle
  • height [Numeric] — the height of the rectangle

Returns:

  • [Polygon] —

new_square(point, size) → Polygon

Construct a square Polygon from a Point and the size dimensions

Parameters:

  • point [Point] — the upper left point of the rectangle
  • size [Numeric] — the width of the rectangle

Returns:

  • [Polygon] —

point!(pt) → Point

Check and/or convert a point to a Cartesia::Point

Parameters:

  • pt [Array<Numeric> or Point or Symbol] — the incoming point arg

Returns:

  • [Point] — a Cartesia::Point object

points!(pt) → Array<Point>

Check and/or convert an array of points or numeric coordinates to an arrya of Cartesia::Points

Parameters:

  • pt [Array<Numeric> or Array<Point> or Array<Array<Numeric>>] — the incoming point array arg

Returns:

  • [Array<Point>] — theh array of Cartesia::Points

r2angle(r) → Angle

Construct an Angle instance from a radian angle measurement.

Parameters:

  • r [Numeric] — the angle in radians

Returns:

  • [Angle] — a Cartesia::Angle instance

s2angle(s) → Angle

Construct an Angle instance from a secton angle measurement.

Parameters:

  • s [Numeric] — the angle in sectons

Returns:

  • [Angle] — a Cartesia::Angle instance

Class: Cartesia::Angle

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/angle.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all angle-based calculations.

Constructor Registry

Item
Attributes
new(m, uom)
-

Method Registry

Item
Attributes
+ → Angle
-
- → Angle
-
< → Boolean
-
<= → Boolean
-
== → Boolean
-
> → Boolean
-
>= → Boolean
-
add(m, uom) → Angle
-
add!(m, uom) → Angle
-
clamp! → Angle
-
degrees → Numeric
-
delta → Angle
-
delta! → Angle
-
difference → Angle
-
reflect_around_pi → Angle
-
reflect_around_pi! → Angle
-
reflect_toward_zero → Angle
-
reflect_toward_zero! → Angle
-
sectons → Numeric
-
set(m, uom)
-
to_s → String
-
u2r(m, uom) → Numeric
<private>

Constructor Details

new(m, uom)

Parameters:

  • m [Numeric or Cartesia::Angle] — the initial value of the angle
  • uom [Symbol] — the unit of measurement for the value <default: :radians>

Method Details

+ → Angle

Create a new Angle instance with an angle measurement of the current Angle's measurement added by specified units

Returns:

  • [Angle] — a new Angle instance

- → Angle

Create a new Angle instance with an angle measurement of the current Angle's measurement subtracted by specified units

Returns:

  • [Angle] — a new Angle instance

< → Boolean

Compare two angles for less then

Returns:

  • [Boolean] — true if the angles are equal

<= → Boolean

Compare two angles for less than or equal

Returns:

  • [Boolean] — true if the angles are equal

== → Boolean

Compare two angles for equality

Returns:

  • [Boolean] — true if the angles are equal

> → Boolean

Compare two angles for greater than

Returns:

  • [Boolean] — true if the angles are equal

>= → Boolean

Compare two angles for greater than or equal

Returns:

  • [Boolean] — true if the angles are equal

add(m, uom) → Angle

Create a new Angle instance with an angle measurement of the current Angle's measurement added by specified units

Parameters:

  • m [Numeric or Cartesia::Angle] — the initial value of the angle
  • uom [Symbol] — the unit of measurement for the value <default: :radians>

Returns:

  • [Angle] — a new Angle instance

add!(m, uom) → Angle

Add an angle measurement to an existing Angle

Parameters:

  • m [Numeric or Cartesia::Angle] — the initial value of the angle
  • uom [Symbol] — the unit of measurement for the value <default: :radians>

Returns:

  • [Angle] — the current Angle instance

clamp! → Angle

Ensure that an angle measurement is between 0 and RAD360

Returns:

  • [Angle] — the current Angle instance

degrees → Numeric

Unit conversion method

Returns:

  • [Numeric] — the measure of the angle in degrees

delta → Angle

Returns:

  • [Angle] — a new Angle instance

delta! → Angle

Returns:

  • [Angle] — the current Angle instance

difference → Angle

Calculate the difference between two angles

Returns:

  • [Angle] — the difference between two angles

reflect_around_pi → Angle

Returns:

  • [Angle] — a new Angle instance

reflect_around_pi! → Angle

Ensure that ...

Returns:

  • [Angle] — the current Angle instance

reflect_toward_zero → Angle

Returns:

  • [Angle] — a new Angle instance

reflect_toward_zero! → Angle

Returns:

  • [Angle] — the current Angle instance

sectons → Numeric

Unit conversion method

Returns:

  • [Numeric] — the measure of the angle in sectons

set(m, uom)

Sets the value for the angle

Parameters:

  • m [Numeric or Cartesia::Angle] — the initial value of the angle
  • uom [Symbol] — the unit of measurement for the value <default: :radians>

to_s → String

String conversion method

Returns:

  • [String] — the measure of the angle in radians as a String

u2r(m, uom) → Numeric   <private>

Unit conversion method used to extract radian measurements from a variety of sources.

Parameters:

  • m [Numeric or Cartesia::Angle] — the measure of the angle to convert / extract
  • uom [Symbol] — the unit of measurement for the value (ignored if m is a Cartesia::Angle) <default: :radians>

Returns:

  • [Numeric] — the angle measurement in radians

Class: Cartesia::Arc ← Cartesia::Circle

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/arc.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all arc-based calculations.

Constructor Registry

Item
Attributes
new(center, radius, bearing_slice)
-

Method Registry

Item
Attributes
intersection_from_line(line) → Array<Point>
-
to_s → String
-

Constructor Details

new(center, radius, bearing_slice)

Parameters:

  • center [Point] — the center point of the circle
  • radius [Numeric] — the radius of the circle
  • bearing_slice [Array<Angle>] — a 2-element array of angles defining the bearings of the arc slice

Method Details

intersection_from_line(line) → Array<Point>

Calculate the intersection of the arc with a specified line

Parameters:

  • line [Line] — the line to compare against

Returns:

  • [Array<Point>] — the points which intersect, or :outside

to_s → String

String conversion method

Returns:

  • [String] — the string representation of the arc

Class: Cartesia::Bezier

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/bezier.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all bezier-based calculations.

Constructor Registry

Item
Attributes
new(pts)
-

Method Registry

Item
Attributes
e_points(intervals)
-
is_valid? → Boolean
-
length → Integer
-
t_points(intervals)
-

Constructor Details

new(pts)

Parameters:

  • pts [Array<Point> or Array<Numeric>] — an array of points defining the Bezier curve

Method Details

e_points(intervals)

Parameters:

  • intervals [Integer] — the number of intervals between the start and end of the bezier curve

is_valid? → Boolean

Returns:

  • [Boolean] — true if the bezier curve is of a known type (cubic or quadratic)

length → Integer

This function returns the length of the bezier curve

Returns:

  • [Integer] — the length of the bezier curve in units

t_points(intervals)

Parameters:

  • intervals [Integer] — the number of intervals between the start and end of the bezier curve

Class: Cartesia::Catenary

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/catenary.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all catenary-based calculations.

Constructor Registry

Item
Attributes
new(methods)
-

Method Registry

Item
Attributes
calc_a_give_dxphi(dx, phi) → Number
<private>
calc_a_give_dydx(dy, dx) → Number
<private>
calc_a_give_dyphi(dy, phi) → Number
<private>
ct_first(point, distance_from) → Point
-
ct_next(distance_from) → Point
-
ct_track_point(op, pt, distance, precision) → Point
<private>
dy_at_dx(dx) → Number
-
dy_at_dx(dy) → Number
-
finish_curve_tracking
-
phi_at_dx(dx) → Number
-
phi_at_dy(dy) → Number
-
s_at_dx(dx) → Number
-
s_at_dy(dy) → Number
-
start_curve_tracking(anchor, dx, style, direction) → Boolean
-
to_s → String
-
tracking? → Boolean
-

Constructor Details

new(methods)

Parameters:

  • methods [Hash] — the data defining the catenary curve (variants exist)

Method Details

calc_a_give_dxphi(dx, phi) → Number   <private>

Parameters:

  • dx [Number] — the dx value of the curve
  • phi [Number] — the phi value of the curve

Returns:

  • [Number] — the calculated a value

calc_a_give_dydx(dy, dx) → Number   <private>

Parameters:

  • dy [Number] — the dy value of the curve
  • dx [Number] — the dx value of the curve

Returns:

  • [Number] — the calculated a value

calc_a_give_dyphi(dy, phi) → Number   <private>

Parameters:

  • dy [Number] — the dy value of the curve
  • phi [Number] — the phi value of the curve

Returns:

  • [Number] — the calculated a value

ct_first(point, distance_from) → Point

Parameters:

  • point [Point] — the initial reference piont <default: nil>
  • distance_from [Number] — the distance from the point <default: nil>

Returns:

  • [Point] — the first tracking point

ct_next(distance_from) → Point

Parameters:

  • distance_from [Number] — the distance from the current tracked point

Returns:

  • [Point] — the next tracking point

ct_track_point(op, pt, distance, precision) → Point   <private>

Parameters:

  • op [Symbol] — the tracking operation, values are { :first, :next }
  • pt [Point] — the reference point
  • distance [Number] — the distance from the reference point
  • precision [Number] — the dx value of the curve <default: 3>

Returns:

  • [Point] — the next tracked point

dy_at_dx(dx) → Number

Parameters:

  • dx [Number] — the dx value

Returns:

  • [Number] — the dy value

dy_at_dx(dy) → Number

Parameters:

  • dy [Number] — the dy value

Returns:

  • [Number] — the dx value

finish_curve_tracking

This method takes the curve out of a tracking state.

phi_at_dx(dx) → Number

Parameters:

  • dx [Number] — the dx value

Returns:

  • [Number] — the phi value

phi_at_dy(dy) → Number

Parameters:

  • dy [Number] — the dy value

Returns:

  • [Number] — the phi value

s_at_dx(dx) → Number

Parameters:

  • dx [Number] — the dx value

Returns:

  • [Number] — the s value

s_at_dy(dy) → Number

Parameters:

  • dy [Number] — the dy value

Returns:

  • [Number] — the s value

start_curve_tracking(anchor, dx, style, direction) → Boolean

Parameters:

  • anchor [Point] — the anchor point of the catenary curve
  • dx [Number] — the distance from the anchor point
  • style [Symbol] — the style of curve tracking, values are { :px, :nx, :invpx, :invnx }
  • direction [Symbol] — the direction of the track, values are { :a2e, :e2a }

Returns:

  • [Boolean] — the tracking state of the catenary curve

to_s → String

String conversion method

Returns:

  • [String] — the string representation of the catenary curve

tracking? → Boolean

Returns:

  • [Boolean] — the tracking state of the catenary curve

Class: Cartesia::ChainWrap

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/chainwrap.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class implements a chain wrapping algorithm (useful for tank tread graphics).

There are expectations:

Bogies are a list of Hashes, each containing the following information: - :type :: one of { :drive,:road,:rear,:top } in that order in the list :: with :tension bogies that can appear between runs of specific types :: See British Churhills - :cx :: center point of the bogie - :cy :: center point of the bogie - :r :: physical radius of the bogie - :z :: the front/back order of the bogies (not needed for this class) - :teeth :: #teeth of the drive bogie (:drive only, not needed for this class)

The position of the bogies can be based off of some offset. If provided, it must be an array: [ dx,dy ].

Catgrav_hints is a 2-element array of angles for catgrav treads. The values are in degrees. [0] is for the drive bogie, [1] is for the rear bogie.

Constructor Registry

Item
Attributes
new(bogies, style, link_thinkness, link_length, links_per_tooth, offset, catgrav_hints)
-

Constructor Details

new(bogies, style, link_thinkness, link_length, links_per_tooth, offset, catgrav_hints)

Parameters:

  • bogies [Array<Hash>] — the list of bogies to wrap the chain around
  • style [] —
  • link_thinkness [Number] — the thickness of the chain
  • link_length [Number] — the length of each link of the chain
  • links_per_tooth [Number] — the number of links per bogie tooth <default: 1>
  • offset [Point] — an offset point <default: nil>
  • catgrav_hints [Hash] — catenary curve information for chains/treads that are not taut <default: nil>

Class: Cartesia::Circle

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/circle.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all circle-based calculations.

Constructor Registry

Item
Attributes
new(center, radius)
-

Method Registry

Item
Attributes
!=(circle) → Boolean
-
==(circle) → Boolean
-
bounding_box → Polygon
-
closest_intersection_point_from_point(point) → Point
-
distance_from_point(point) → Numeric
-
get_chord_angle_by_length(length) → Angle
-
get_chord_length_by_angle(angle) → Numeric
-
get_chord_length_by_nsegs(nsegs) → Numeric
-
get_chord_points_by_len(length, direction, first_angle)
-
get_chord_points_by_n(npts) → Array<Point>
-
get_point(angle) → Point
-
get_tangent_line_between_circles(circle, connection) → Line
-
get_tangent_vectors(bearing) → Hash<Line>
-
intersection_with_circle(circle) → Hash
-
intersection_with_line(line) → Array<Point>
-
is_point_inside?(point) → Boolean
-
to_s → String
-

Constructor Details

new(center, radius)

Parameters:

  • center [Point] — the center point of the circle
  • radius [Numeric] — the radius of the circle

Method Details

!=(circle) → Boolean

Inequality method

Parameters:

  • circle [Circle] — the circle to compare against

Returns:

  • [Boolean] — true if the circles are not identical

==(circle) → Boolean

Equality method

Parameters:

  • circle [Circle] — the circle to compare against

Returns:

  • [Boolean] — true if the circles are identical

bounding_box → Polygon

Return the bounding box enclosing the circle

Returns:

  • [Polygon] — the bounding box (square) enclosing the circle

closest_intersection_point_from_point(point) → Point

Calculate the closest intersection point on a circle from a given point

Parameters:

  • point [Point] — the point to compare against

Returns:

  • [Point] — the point on the circle closest to the given point

distance_from_point(point) → Numeric

Calculate the closest distance between a given point and the circle

Parameters:

  • point [Point] — the point to compare against

Returns:

  • [Numeric] — the closest distance between the point and any point on the circle

get_chord_angle_by_length(length) → Angle

Get the chord angle defined by the length of the chord

Parameters:

  • length [Numeric] — the length of the chord

Returns:

  • [Angle] — the angle defining the chord

get_chord_length_by_angle(angle) → Numeric

Get the length of a specific chord on the Circle

Parameters:

  • angle [Angle] — the angle defining the chord

Returns:

  • [Numeric] — the length of the specified chord

get_chord_length_by_nsegs(nsegs) → Numeric

Get the length of a specific chord on the Circle

Parameters:

  • nsegs [?Numeric] — the number of equidistance segments defining the chord

Returns:

  • [Numeric] — the length of the specified chord

get_chord_points_by_len(length, direction, first_angle)

Get a set of chord points on a circle

Parameters:

  • length [Numeric] — the length of each chord
  • direction [Symbol] — the direction of travel around the circle { :cw, :ccw }
  • first_angle [Angle] — the angle on the circle to start at

get_chord_points_by_n(npts) → Array<Point>

Get a number of equidistant points around a circle beginning at a specified angle

Parameters:

  • npts [Integer] — the number of points around the circle to get

Returns:

  • [Array<Point>] — an array of Points around the Circle

get_point(angle) → Point

Get a point on the circle at a given angle from the center

Parameters:

  • angle [Angle] — the angle from center where the point is located

Returns:

  • [Point] — the point on the circle

get_tangent_line_between_circles(circle, connection) → Line

Calculate the tangent lines which can connect two circles

Parameters:

  • circle [Circle] — the circle to connect with
  • connection [Symbol] — the type of connection { :cwcw, :ccwccw, :cwccw, :ccwcw }

Returns:

  • [Line] — one of the tangent lines between the circles, or nil if there is no connection

get_tangent_vectors(bearing) → Hash<Line>

Get tangent vectors at a specific point on a circle

Parameters:

  • bearing [Angle] — the bearing from center defining the point's location

Returns:

  • [Hash<Line>] — the two tangent vectors emanating from the point

intersection_with_circle(circle) → Hash

Calculate the intersection point(s) with a given circle

Parameters:

  • circle [Circle] — the circle to compare against

Returns:

  • [Hash] — the point(s) and bearing(s) which intersect, or one of { :infinite, :outside }

intersection_with_line(line) → Array<Point>

Calculate the intersection point(s) with a given line

Parameters:

  • line [Line] — the line to compare against

Returns:

  • [Array<Point>] — the point(s) which intersect, or the symbol :outside

is_point_inside?(point) → Boolean

Is a given point inside the circle

Parameters:

  • point [Point] — the point to compare against

Returns:

  • [Boolean] — true if the point is inside or on the circle

to_s → String

String conversion method

Returns:

  • [String] — the string representation of the circle

Class: Cartesia::HexCoordinateSystem

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/hexcoordinatesystem.rbRubyKenneth F. GuerinCopyright © 2022-2024, Kenneth F. Guerin, all rights reserved.

Overview

This class implements a triangular coordinate system within a hexagon

Constructor Registry

Item
Attributes
new(cpoint, size, granularity, orientation)
-

Method Registry

Item
Attributes
coord_delta(e, v, contrain) → Array<Numeric>
<private>
each
-
each_point_along_edge_axis(e)
-
is_constrained?(e, v) → Boolean
<private>
is_edge_point?(pt) → Boolean
-
nv_at_e(e) → Integer
-
point_at(pt, constrain) → Point
-
rotated_point(pt, segments) → Point
-

Constructor Details

new(cpoint, size, granularity, orientation)

Parameters:

  • cpoint [Point] — the center point of the hexagon in the outside coordinate system
  • size [Numeric] — the edge-to-edge size of the hexagon
  • granularity [Numeric] — the number of coordinates along the e-axis from the center point to each edge
  • orientation [Symbol] — whether the hexagon is wide or tall <default: :wide>

Method Details

coord_delta(e, v, contrain) → Array<Numeric>   <private>

Calculate the delta point at the specified hex-based coordinate

Parameters:

  • e [Integer] — the e-coordinate value
  • v [Integer] — the v-coordinate value
  • contrain [Integer] — check coordinate value constraints <default: false>

Returns:

  • [Array<Numeric>] — the x-delta / y-delta pair

each

Iterate across all points in the hex coordinate system, along the edge-axis first

each_point_along_edge_axis(e)

Iterate along the specified edge-axis

Parameters:

  • e [Numeric] — the e-coordinate to iterate along

is_constrained?(e, v) → Boolean   <private>

Check the constraint of the e,v (edge,vertex) coordinate pair

Parameters:

  • e [Integer] — the e-coordinate value
  • v [Integer] — the v-coordinate value

Returns:

  • [Boolean] — whether the e,v coordinate pair is constrained to the hex area

is_edge_point?(pt) → Boolean

Is the given point on the outside edge of the hexagon

Parameters:

  • pt [Point] — the point to check

Returns:

  • [Boolean] — true if the given point is on the outside edge of the hexagon

nv_at_e(e) → Integer

Calculate the number of coordinates along the v-axis at a specified e-coordinate

Parameters:

  • e [Integer] — the e-coordinate value

Returns:

  • [Integer] — the number of v-coordinates along the v-axis at e

point_at(pt, constrain) → Point

Calculate the point within a hex under on a specified HCS point

Parameters:

  • pt [Point] — the HCS coordinate point within the hex coordinate system
  • constrain [Boolean] — whether the coordinate should be constrained to the hex area <default: true>

Returns:

  • [Point] — the calculated point at some offset from the hexagon's center point

rotated_point(pt, segments) → Point

Calculate a new HCS point from a specified HCS point rotated N 60-degree segments clockwise around the center

Parameters:

  • pt [Point] — the original HCS coordinate
  • segments [Integer] — the number of 60-degree segments to rotate the point clockwise

Returns:

  • [Point] — the rotated HCS coordinate

Class: Cartesia::HexGeometry

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/hexgeometry.rbRubyKenneth F. GuerinCopyright © 2022-2024, Kenneth F. Guerin, all rights reserved.

Overview

This singleton class implements hexagon-specific geometric formulae.

Class Method Registry

Item
Attributes
ee2vv(size) → Numeric
-
get_vertex_offsets(size) → Array<Numeric>
-
vv2ee(size) → Numeric
-

Class Method Details

ee2vv(size) → Numeric

Calculate the hexagon's vertex-to-vertex size from its edge-to-edge size

Parameters:

  • size [Numeric] — the hexagon's edge-to-edge size

Returns:

  • [Numeric] — the vertex-to-vertex size of the hexagon

get_vertex_offsets(size) → Array<Numeric>

Return a list of the 3 hex vertex offset values from the center point. The first offset value is the e-axis offset to the flat edge. The second offset value is the v-axis offset to the vertex aligned with the center point. The third offset value is the v-axis offset to the other vertices.

Parameters:

  • size [Numeric] — the hexagon's edge-to-edge size

Returns:

  • [Array<Numeric>] — the hexagon's vertex offsets

vv2ee(size) → Numeric

Calculate the hexagon's edge-to-edge size from its vertex-to-vertex size

Parameters:

  • size [Numeric] — the hexagon's edge-to-edge size

Returns:

  • [Numeric] — the vertex-to-vertex size of the hexagon

Class: Cartesia::Hexagon

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/polygon.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
Copyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all hexagon-based calculations.

Constructor Registry

Item
Attributes
new(cpoint, size, orientation)
-

Method Registry

Item
Attributes
height → Numeric
-
width → Numeric
-

Constructor Details

new(cpoint, size, orientation)

Parameters:

  • cpoint [Numeric] — the center point of the hexagon
  • size [Numeric] — the (flat) edge-to-edge size of the hexagon
  • orientation [] — the orientation of the hexagon

Method Details

height → Numeric

Returns:

  • [Numeric] — the height of the hexagon

width → Numeric

Returns:

  • [Numeric] — the width of the hexagon

Class: Cartesia::Line

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/line.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all line-based calculations.

Constructor Registry

Item
Attributes
new(options)
-

Method Registry

Item
Attributes
closest_intersection_point_from_point(point, force_infinite) → Point
-
distance_from_point(point) → Numeric
-
intersection_point(line) → Point] the intersection point, or nil if no intersection can occur, or [Line
-
length → Number
-
point_at_dx(dx) → Point] the intersection point, or nil if no intersection can occur, or [Line
-
point_at_dy(dy) → Point] the intersection point, or nil if no intersection can occur, or [Line
-
point_at_x(x) → Point] the intersection point, or nil if no intersection can occur, or [Line
-
point_at_y(y) → Point] the intersection point, or nil if no intersection can occur, or [Line
-
split → Array<Line>
-
to_ary → Array<Numeric>
-
to_s → String
-

Constructor Details

new(options)

Parameters:

  • options [Hash] — the initial parameters of the line

Method Details

closest_intersection_point_from_point(point, force_infinite) → Point

Calculate the closest intersection point on a line to a given point.

Parameters:

  • point [Point] — the point to intersect with
  • force_infinite [Boolean] — ignore vector/segment line length limits

Returns:

  • [Point] — a point on a line closest to the given point

distance_from_point(point) → Numeric

Calculate the closest distance between a line to a given point.

Parameters:

  • point [Point] — the point to intersect with

Returns:

  • [Numeric] — the closest distance to the given point

intersection_point(line) → Point] the intersection point, or nil if no intersection can occur, or [Line

Calculate the intersection point between two lines.

Parameters:

  • line [Line] — the line to intersect with

Returns:

  • [Point] the intersection point, or nil if no intersection can occur, or [Line] — self if the lines coincide

length → Number

Return the length of the line segment.

Returns:

  • [Number] — the length of the line segment

point_at_dx(dx) → Point] the intersection point, or nil if no intersection can occur, or [Line

Calculate the intersection point on a line where the point is some horizontal distance from the reference point.

Parameters:

  • dx [Numeric] — the horizontal delta distance

Returns:

  • [Point] the intersection point, or nil if no intersection can occur, or [Line] — self if the lines coincide

point_at_dy(dy) → Point] the intersection point, or nil if no intersection can occur, or [Line

Calculate the intersection point on a line where the point is some vertical distance from the reference point.

Parameters:

  • dy [Numeric] — the vertical delta distance

Returns:

  • [Point] the intersection point, or nil if no intersection can occur, or [Line] — self if the lines coincide

point_at_x(x) → Point] the intersection point, or nil if no intersection can occur, or [Line

Calculate the intersection point on a line where the point is at some specific horizontal location.

Parameters:

  • x [Numeric] — the x-coordinate

Returns:

  • [Point] the intersection point, or nil if no intersection can occur, or [Line] — self if the lines coincide

point_at_y(y) → Point] the intersection point, or nil if no intersection can occur, or [Line

Calculate the intersection point on a line where the point is at some specific vertical location.

Parameters:

  • y [Numeric] — the y-coordinate

Returns:

  • [Point] the intersection point, or nil if no intersection can occur, or [Line] — self if the lines coincide

split → Array<Line>

Create an array of two vectors from an infinite line.

Returns:

  • [Array<Line>] — the two new vectors

to_ary → Array<Numeric>

Array conversion method.

Returns:

  • [Array<Numeric>] — an array representation of the Line

to_s → String

String conversion method.

Returns:

  • [String] — a string representation of the Line

Class: Cartesia::Point

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/point.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all point-based calculations.

Constructor Registry

Item
Attributes
new(x, y)
-

Method Registry

Item
Attributes
!=(point) → Boolean
-
==(point) → Boolean
-
bearing_from(point) → Angle
-
bearing_to(point) → Angle
-
distance_from(point) → Numeric
-
dxy_to(point) → Array<Numeric>
-
move_to!(distance, bearing) → Point
-
new_point_from(distance, bearing) → Point
-
new_point_rotated_from(point, angle) → Point
-
new_point_using_dxy(dx, dy) → Point
-
rotate_around!(point, angle) → Point
-
set(x, y) → Point
-
to_ary → Array<Numeric>
-
to_s → String
-

Constructor Details

new(x, y)

The class initializer.

Parameters:

  • x [Numeric] — the x coordinate of the point
  • y [Numeric] — the y coordinate of the point

Method Details

!=(point) → Boolean

Inequality comparison method.

Parameters:

  • point [Point] — the point to compare against

Returns:

  • [Boolean] — true if the points are not at the same location

==(point) → Boolean

Equality comparison method.

Parameters:

  • point [Point] — the point to compare against

Returns:

  • [Boolean] — true if the points are at the same location

bearing_from(point) → Angle

Calculate the bearing from another point to this point.

Parameters:

  • point [Point] — the point to measure against

Returns:

  • [Angle] — the bearing from another point to this point

bearing_to(point) → Angle

Calculate the bearing from this point to another point.

Parameters:

  • point [Point] — the point to measure against

Returns:

  • [Angle] — the bearing from this point to another point

distance_from(point) → Numeric

Calculate the distance between two points.

Parameters:

  • point [Point] — the point to measure against

Returns:

  • [Numeric] — the distance between two points

dxy_to(point) → Array<Numeric>

Calculate the xy distance between two points.

Parameters:

  • point [Point] — the point to measure against

Returns:

  • [Array<Numeric>] — the dx and dy distances between two points

move_to!(distance, bearing) → Point

Move this point to a new location based on distance and bearing.

Parameters:

  • distance [Numeric] — the distance to move the point
  • bearing [Angle] — the bearing to move the point

Returns:

  • [Point] — the current Point instance

new_point_from(distance, bearing) → Point

Create a new point based on this point moved to a new location based on distance and bearing.

Parameters:

  • distance [Numeric] — the distance to move the point
  • bearing [Angle] — the bearing to move the point

Returns:

  • [Point] — the created Point instance

new_point_rotated_from(point, angle) → Point

Create a new point rotated around an origin point by a bearing delta.

Parameters:

  • point [Point] — the point to move the current point around
  • angle [Angle] — the delta bearing to rotate the point

Returns:

  • [Point] — the created Point instance

new_point_using_dxy(dx, dy) → Point

Create a new point based on this point moved to a new location based on dx & dy distances.

Parameters:

  • dx [Numeric] — the distance to move the point along the x-axis
  • dy [Numeric] — the distance to move the point along the y-axis

Returns:

  • [Point] — the created Point instance

rotate_around!(point, angle) → Point

Rotate the point around an origin point by a bearing delta.

Parameters:

  • point [Point] — the point to move the current point around
  • angle [Angle] — the delta bearing to rotate the point

Returns:

  • [Point] — the current Point instance

set(x, y) → Point

Sets the Point location.

Parameters:

  • x [Numeric] — the x coordinate of the new location
  • y [Numeric] — the y coordinate of the new location

Returns:

  • [Point] — the current Point instance

to_ary → Array<Numeric>

Array conversion method.

Returns:

  • [Array<Numeric>] — an array representation of the Point

to_s → String

String conversion method.

Returns:

  • [String] — a string representation of the Point

Class: Cartesia::Polygon

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/cartesia/polygon.rbRubyKenneth F. GuerinCopyright © 2020-2022, Kenneth F. Guerin, all rights reserved.
Copyright © 2020-2022, Kenneth F. Guerin, all rights reserved.

Overview

This class handles all polygon-based calculations.

Constructor Registry

Item
Attributes
new(points)
-

Method Registry

Item
Attributes
append_point(point) → Polygon
-
append_points(points) → Polygon
-
closest_intersection_point_from_point(point) → Point
-
delete_point_at(index) → Polygon
-
distance_from_point(point) → Numeric
-
gen_line_segments → Array<Line>
<private>
insert_point(point, index) → Polygon
-
insert_points(points, index) → Polygon
-
is_point_inside?(point) → Boolean
-
pt_distance_info(point) → Array
<private>
to_s → String
-

Constructor Details

new(points)

Parameters:

  • points [Array<Point>] — the points of the polygon

Method Details

append_point(point) → Polygon

Append a single point to the polygon.

Parameters:

  • point [Point] — the new point of the polygon

Returns:

  • [Polygon] — the current Polygon instance

append_points(points) → Polygon

Append a set of points to the polygon.

Parameters:

  • points [Array<Point>] — the new points of the polygon

Returns:

  • [Polygon] — the current Polygon instance

closest_intersection_point_from_point(point) → Point

Calculate the closest intersection point between a given point and the polygon.

Parameters:

  • point [Point] — the point to check against

Returns:

  • [Point] — the point on the polygon closest to the given point

delete_point_at(index) → Polygon

Delete a single point within the polygon.

Parameters:

  • index [Integer] — the insertion point within the polygon point list

Returns:

  • [Polygon] — the current Polygon instance

distance_from_point(point) → Numeric

Calculate the closest distance between a given point and the polygon.

Parameters:

  • point [Point] — the point to check against

Returns:

  • [Numeric] — the closest distance between the polygon and the given point

gen_line_segments → Array<Line>   <private>

Generate the line segments of a polygon from the given points.

Returns:

  • [Array<Line>] — the array of line segments

insert_point(point, index) → Polygon

Insert a single point within the polygon.

Parameters:

  • point [Point] — the new point of the polygon
  • index [Integer] — the insertion point within the polygon point list

Returns:

  • [Polygon] — the current Polygon instance

insert_points(points, index) → Polygon

Insert a set of points within the polygon.

Parameters:

  • points [Array<Point>] — the new points of the polygon
  • index [Integer] — the insertion point within the polygon point list

Returns:

  • [Polygon] — the current Polygon instance

is_point_inside?(point) → Boolean

Calculates whether a given point is within the area enclosed by a polygon.

Parameters:

  • point [Point] — the point to check

Returns:

  • [Boolean] — true if the point is within the polygon area

pt_distance_info(point) → Array   <private>

Calculate closest point and distance information between a point and the polygon.

Parameters:

  • point [Point] — the point to check

Returns:

  • [Array] — a mixed type 2-element array containing the intersection point and the distance to it

to_s → String

String conversion method.

Returns:

  • [String] — the string representation of the polygon

Class: Cartesia

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/cartesia/singletons.cCRubyKenneth F. GuerinCopyright © 2020-2022 Kenneth F. Guerin, All rights reserved.

Overview

Singleton Registry

Item
Attributes
clamp_angle(radians) → Numeric
-
clamp_angle_to_pi(radians) → Numeric
-
d2r(d) → Numeric
-
d2s(d) → Numeric
-
distance_from(pt1, pt2) → Array<Numeric>
-
dxybearing(dx, dy) → Numeric
-
dxydab(dx, dy) → Array<Numeric>
-
dxydistance(dx, dy) → Numeric
-
r2d(r) → Numeric
-
r2s(r) → Numeric
-
s2d(s) → Numeric
-
s2r(s) → Numeric
-

Singleton Details

clamp_angle(radians) → Numeric

Parameters:

  • radians [Numeric] — the angle measurement in radians

Returns:

  • [Numeric] — the clamped angle measurement in radians

clamp_angle_to_pi(radians) → Numeric

Parameters:

  • radians [Numeric] — the angle measurement in radians

Returns:

  • [Numeric] — the clamped angle measurement in radians

d2r(d) → Numeric

Parameters:

  • d [Numeric] — the angle measurement in degrees

Returns:

  • [Numeric] — the angle measurement in radians

d2s(d) → Numeric

Parameters:

  • d [Numeric] — the angle measurement in degrees

Returns:

  • [Numeric] — the angle measurement in sectons

distance_from(pt1, pt2) → Array<Numeric>

Parameters:

  • pt1 [Array<Numeric>] — the first point, defined as a 2-dimensional array of coordinate points (x,y)
  • pt2 [Array<Numeric>] — the second point, defined as a 2-dimensional array of coordinate points (x,y)

Returns:

  • [Array<Numeric>] — the distance between the two points

dxybearing(dx, dy) → Numeric

Parameters:

  • dx [Numeric] — the x-coordinate distance between two points
  • dy [Numeric] — the y-coordinate distance between two points

Returns:

  • [Numeric] — the angle from one point to the next measured in radians

dxydab(dx, dy) → Array<Numeric>

Parameters:

  • dx [Numeric] — the x-coordinate distance between two points
  • dy [Numeric] — the y-coordinate distance between two points

Returns:

  • [Array<Numeric>] — the 2-dimensional array containing the distance and bearing between the two points

dxydistance(dx, dy) → Numeric

Parameters:

  • dx [Numeric] — the x-coordinate distance between two points
  • dy [Numeric] — the y-coordinate distance between two points

Returns:

  • [Numeric] — the distance between the two points

r2d(r) → Numeric

Parameters:

  • r [Numeric] — the angle measurement in radians

Returns:

  • [Numeric] — the angle measurement in degrees

r2s(r) → Numeric

Parameters:

  • r [Numeric] — the angle measurement in radians

Returns:

  • [Numeric] — the angle measurement in sectons

s2d(s) → Numeric

Parameters:

  • s [Numeric] — the angle measurement in sectons

Returns:

  • [Numeric] — the angle measurement in degrees

s2r(s) → Numeric

Parameters:

  • s [Numeric] — the angle measurement in sectons

Returns:

  • [Numeric] — the angle measurement in radians

This documentation page was generated by the Codoc gem on 23-Nov-2025 at 19:59:43.
Library Documentation Page
The Cartesia Geometry Toolkit
Overview
Cartesia (namespace)
Cartesia.Angle (class)
Cartesia.Arc ( ← Cartesia.Circle)
Cartesia.Bezier (class)
Cartesia.Catenary (class)
Cartesia.ChainWrap (class)
Cartesia.Circle (class)
Cartesia.HexCoordinateSystem (class)
Cartesia.HexCoordinateSystem.Path (class)
Cartesia.HexGeometry (namespace)
Cartesia.HexMapInfo (class)
Cartesia.Hexagon ( ← Cartesia.Polygon)
Cartesia.Line (class)
Cartesia.Point (class)
Cartesia.Polygon (class)

Overview

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
angle.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
arc.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
bezier.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
cartesia.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
catenary.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
chainwrap.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
circle.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
hexCoordinateSystem.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
hexGeometry.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
hexMapInfo.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
line.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
point.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
polygon.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Contents Directory

Objects
N Cartesia
C Cartesia.Angle
C Cartesia.Arc ← Cartesia.Circle
C Cartesia.Bezier
C Cartesia.Catenary
C Cartesia.ChainWrap
C Cartesia.Circle
C Cartesia.HexCoordinateSystem
C Cartesia.HexCoordinateSystem.Path
N Cartesia.HexGeometry
C Cartesia.HexMapInfo
C Cartesia.Hexagon ← Cartesia.Polygon
C Cartesia.Line
C Cartesia.Point
C Cartesia.Polygon
Constants & Methods
• Cartesia.CCW (Cartesia)
• Cartesia.CCWCCW (Cartesia)
• Cartesia.CCWCW (Cartesia)
• Cartesia.CUBIC (Cartesia)
• Cartesia.CW (Cartesia)
• Cartesia.CWCCW (Cartesia)
• Cartesia.CWCW (Cartesia)
• Cartesia.DEGREES (Cartesia)
• Cartesia.INFINITE (Cartesia)
• Cartesia.INSIDE (Cartesia)
• Cartesia.LINE_INFINITE (Cartesia)
• Cartesia.LINE_SEGMENT (Cartesia)
• Cartesia.LINE_VECTOR (Cartesia)
• Cartesia.OUTSIDE (Cartesia)
• Cartesia.QUADRATIC (Cartesia)
• Cartesia.RAD0 (Cartesia)
• Cartesia.RAD180 (Cartesia)
• Cartesia.RAD270 (Cartesia)
• Cartesia.RAD360 (Cartesia)
• Cartesia.RAD45 (Cartesia)
• Cartesia.RAD90 (Cartesia)
• Cartesia.RADIANS (Cartesia)
• Cartesia.SEC0 (Cartesia)
• Cartesia.SEC180 (Cartesia)
• Cartesia.SEC270 (Cartesia)
• Cartesia.SEC360 (Cartesia)
• Cartesia.SEC45 (Cartesia)
• Cartesia.SEC90 (Cartesia)
• Cartesia.SECTONS (Cartesia)
• Cartesia.TALL (Cartesia)
• Cartesia.WIDE (Cartesia)
• Cartesia.bearingFrom (Cartesia)
• Cartesia.bezierCurveLength (Cartesia)
• Cartesia.bezierGetEPoints (Cartesia)
• Cartesia.bezierGetTPoints (Cartesia)
• Cartesia.bezierHullLength (Cartesia)
• Cartesia.chordAngle (Cartesia)
• Cartesia.chordLength (Cartesia)
• Cartesia.clampAngle (Cartesia)
• Cartesia.clampAngleToPI (Cartesia)
• Cartesia.cp2pt (Cartesia)
• Cartesia.cpv2pts (Cartesia)
• Cartesia.d2angle (Cartesia)
• Cartesia.d2r (Cartesia)
• Cartesia.d2s (Cartesia)
• Cartesia.dabFrom (Cartesia)
• Cartesia.distanceFrom (Cartesia)
• Cartesia.dxyBearing (Cartesia)
• Cartesia.dxyDAB (Cartesia)
• Cartesia.dxyDistance (Cartesia)
• Cartesia.ensureAngle (Cartesia)
• Cartesia.ensurePoint (Cartesia)
• Cartesia.ensurePoints (Cartesia)
• Cartesia.findCircleArcOrigin (Cartesia)
• Cartesia.getOrbitPoints (Cartesia)
• Cartesia.getPointCoords (Cartesia)
• Cartesia.getRadialPoints (Cartesia)
• Cartesia.getRadians (Cartesia)
• Cartesia.getSpokePoints (Cartesia)
• Cartesia.newLineSegment (Cartesia)
• Cartesia.newRect (Cartesia)
• Cartesia.newSquare (Cartesia)
• Cartesia.pointBetween (Cartesia)
• Cartesia.pointFrom (Cartesia)
• Cartesia.r2angle (Cartesia)
• Cartesia.r2d (Cartesia)
• Cartesia.r2s (Cartesia)
• Cartesia.rotatedPointFrom (Cartesia)
• Cartesia.s2angle (Cartesia)
• Cartesia.s2d (Cartesia)
• Cartesia.s2r (Cartesia)
• Cartesia.u2r (Cartesia)
• Cartesia.xy2pt (Cartesia)
• degrees (Cartesia.Angle)
• sections (Cartesia.Angle)
• add (Cartesia.Angle)
• add$ (Cartesia.Angle)
• clone (Cartesia.Angle)
• delta (Cartesia.Angle)
• delta$ (Cartesia.Angle)
• difference (Cartesia.Angle)
• reflectAroundPI (Cartesia.Angle)
• reflectAroundPI$ (Cartesia.Angle)
• reflectTowardZero (Cartesia.Angle)
• reflectTowardZero$ (Cartesia.Angle)
• set (Cartesia.Angle)
• toString (Cartesia.Angle)
• valueOf (Cartesia.Angle)
• intersectionWithArc (Cartesia.Arc)
• intersectionWithCircle (Cartesia.Arc)
• intersectionWithLine (Cartesia.Arc)
• toString (Cartesia.Arc)
• length (Cartesia.Bezier)
• ePoints (Cartesia.Bezier)
• isValid (Cartesia.Bezier)
• tPoints (Cartesia.Bezier)
• isTracking (Cartesia.Catenary)
• $calcAGivenDXPhi (Cartesia.Catenary) <private>
• $calcAGivenDyPhi (Cartesia.Catenary) <private>
• $calcAGivenDydx (Cartesia.Catenary) <private>
• $ctTrackPoint (Cartesia.Catenary) <private>
• ctFirst (Cartesia.Catenary)
• ctNext (Cartesia.Catenary)
• dxAtDY (Cartesia.Catenary)
• dyAtDX (Cartesia.Catenary)
• finishCurveTracking (Cartesia.Catenary)
• phiAtDX (Cartesia.Catenary)
• phiAtDY (Cartesia.Catenary)
• sAtDX (Cartesia.Catenary)
• sAtDY (Cartesia.Catenary)
• startCurveTracking (Cartesia.Catenary)
• toString (Cartesia.Catenary)
• pathinfo (Cartesia.ChainWrap)
• $calcLinkLength (Cartesia.ChainWrap) <private>
• $makeCircleFromBogie (Cartesia.ChainWrap) <private>
• harvest (Cartesia.ChainWrap)
• boundingBox (Cartesia.Circle)
• clone (Cartesia.Circle)
• closestIntersectionPointFromPoint (Cartesia.Circle)
• distanceFromPoint (Cartesia.Circle)
• getChordAngleByLength (Cartesia.Circle)
• getChordLengthByAngle (Cartesia.Circle)
• getChordLengthByNSegs (Cartesia.Circle)
• getChordPointsByLength (Cartesia.Circle)
• getChordPointsByN (Cartesia.Circle)
• getPoint (Cartesia.Circle)
• getTangentLineBetweenCircles (Cartesia.Circle)
• getTangentVectors (Cartesia.Circle)
• intersectionWithCircle (Cartesia.Circle)
• intersectionWithLine (Cartesia.Circle)
• isPointInside (Cartesia.Circle)
• toString (Cartesia.Circle)
• $coordDelta (Cartesia.HexCoordinateSystem) <private>
• $isConstrained (Cartesia.HexCoordinateSystem) <private>
• coordsAt (Cartesia.HexCoordinateSystem)
• eachPoint (Cartesia.HexCoordinateSystem)
• eachPointAlongEdgeAxis (Cartesia.HexCoordinateSystem)
• isConstrainedPoint (Cartesia.HexCoordinateSystem)
• isEdgePoint (Cartesia.HexCoordinateSystem)
• nvAtE (Cartesia.HexCoordinateSystem)
• pointAt (Cartesia.HexCoordinateSystem)
• rectangleCoordsAround (Cartesia.HexCoordinateSystem)
• rectanglePointsAround (Cartesia.HexCoordinateSystem)
• rotatedCoord (Cartesia.HexCoordinateSystem)
• rotatedPoint (Cartesia.HexCoordinateSystem)
• $parse (Cartesia.HexCoordinateSystem.Path) <private>
• isConstrained (Cartesia.HexCoordinateSystem.Path)
• isValid (Cartesia.HexCoordinateSystem.Path)
• lastCoord (Cartesia.HexCoordinateSystem.Path)
• lastPoint (Cartesia.HexCoordinateSystem.Path)
• mirror (Cartesia.HexCoordinateSystem.Path)
• normalized (Cartesia.HexCoordinateSystem.Path)
• render (Cartesia.HexCoordinateSystem.Path)
• renderAsPolygons (Cartesia.HexCoordinateSystem.Path)
• reverse (Cartesia.HexCoordinateSystem.Path)
• rotate (Cartesia.HexCoordinateSystem.Path)
• setConstrain (Cartesia.HexCoordinateSystem.Path)
• setDescriptor (Cartesia.HexCoordinateSystem.Path)
• toString (Cartesia.HexCoordinateSystem.Path)
• ee2vv (Cartesia.HexGeometry)
• getTallVertexOffsetPoints (Cartesia.HexGeometry)
• getVertexOffsetInfo (Cartesia.HexGeometry)
• getVertexOffsets (Cartesia.HexGeometry)
• getWideVertexOffsetPoints (Cartesia.HexGeometry)
• vv2ee (Cartesia.HexGeometry)
• $directionToInteger (Cartesia.HexMapInfo) <private>
• bboxAt (Cartesia.HexMapInfo)
• buildHexPathDescriptor (Cartesia.HexMapInfo)
• calcHexPathBounds (Cartesia.HexMapInfo)
• coordAt (Cartesia.HexMapInfo)
• draw (Cartesia.HexMapInfo)
• formatHexPathDescriptor (Cartesia.HexMapInfo)
• getAdjacentTiles (Cartesia.HexMapInfo)
• getAlignment (Cartesia.HexMapInfo)
• getSpineAlignment (Cartesia.HexMapInfo)
• hcsFor (Cartesia.HexMapInfo)
• hexesAway (Cartesia.HexMapInfo)
• hextantsAway (Cartesia.HexMapInfo)
• isAdjacent (Cartesia.HexMapInfo)
• makeCirclePath (Cartesia.HexMapInfo)
• makeHexPath (Cartesia.HexMapInfo)
• makeHexPathCoords (Cartesia.HexMapInfo)
• makePathInHex (Cartesia.HexMapInfo)
• mapdims (Cartesia.HexMapInfo)
• nearestHexTo (Cartesia.HexMapInfo)
• traceHexPathDescriptor (Cartesia.HexMapInfo)
• visitNextTile (Cartesia.HexMapInfo)
• visitTiles (Cartesia.HexMapInfo)
• height (Cartesia.Hexagon)
• width (Cartesia.Hexagon)
• length (Cartesia.Line)
• clone (Cartesia.Line)
• closestIntersectionPointFromPoint (Cartesia.Line)
• distanceFromPoint (Cartesia.Line)
• intersectionPoint (Cartesia.Line)
• pointAtDX (Cartesia.Line)
• pointAtDY (Cartesia.Line)
• pointAtX (Cartesia.Line)
• pointAtY (Cartesia.Line)
• set (Cartesia.Line)
• split (Cartesia.Line)
• toArray (Cartesia.Line)
• toString (Cartesia.Line)
• x (Cartesia.Point)
• y (Cartesia.Point)
• bearingFrom (Cartesia.Point)
• bearingTo (Cartesia.Point)
• clone (Cartesia.Point)
• distanceFrom (Cartesia.Point)
• dxyTo (Cartesia.Point)
• moveTo$ (Cartesia.Point)
• newPointFrom (Cartesia.Point)
• newPointRotatedFrom (Cartesia.Point)
• newPointUsingDXY (Cartesia.Point)
• rotateAround$ (Cartesia.Point)
• set (Cartesia.Point)
• toArray (Cartesia.Point)
• toString (Cartesia.Point)
• $ptDistanceInfo (Cartesia.Polygon) <private>
• appendPoint (Cartesia.Polygon)
• appendPoints (Cartesia.Polygon)
• boundingBox (Cartesia.Polygon)
• closestIntersectionPointFromPoint (Cartesia.Polygon)
• deletePointAt (Cartesia.Polygon)
• distanceFromPoint (Cartesia.Polygon)
• insertPoint (Cartesia.Polygon)
• insertPoints (Cartesia.Polygon)
• isPointInside (Cartesia.Polygon)
• lineSegments (Cartesia.Polygon)
• set (Cartesia.Polygon)
• toString (Cartesia.Polygon)

Namespace: Cartesia

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
angle.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
arc.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
bezier.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
cartesia.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
catenary.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
chainwrap.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
circle.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
hexCoordinateSystem.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
hexGeometry.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
hexMapInfo.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
line.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
point.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
polygon.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

The Cartesia namespace encapsulates all definitions related to the family of Cartesia classes.

The Cartesia library is a library which handles 2d geometry calculations with some functions operating on individual numbers and some functionality encapsulated within object classes.

Constant Registry

Item
Attributes
Cartesia.CCW
<read-only>
Cartesia.CCWCCW
<read-only>
Cartesia.CCWCW
<read-only>
Cartesia.CUBIC
<read-only>
Cartesia.CW
<read-only>
Cartesia.CWCCW
<read-only>
Cartesia.CWCW
<read-only>
Cartesia.DEGREES
<read-only>
Cartesia.INFINITE
<read-only>
Cartesia.INSIDE
<read-only>
Cartesia.LINE_INFINITE
<read-only>
Cartesia.LINE_SEGMENT
<read-only>
Cartesia.LINE_VECTOR
<read-only>
Cartesia.OUTSIDE
<read-only>
Cartesia.QUADRATIC
<read-only>
Cartesia.RAD0
<read-only>
Cartesia.RAD180
<read-only>
Cartesia.RAD270
<read-only>
Cartesia.RAD360
<read-only>
Cartesia.RAD45
<read-only>
Cartesia.RAD90
<read-only>
Cartesia.RADIANS
<read-only>
Cartesia.SEC0
<read-only>
Cartesia.SEC180
<read-only>
Cartesia.SEC270
<read-only>
Cartesia.SEC360
<read-only>
Cartesia.SEC45
<read-only>
Cartesia.SEC90
<read-only>
Cartesia.SECTONS
<read-only>
Cartesia.TALL
<read-only>
Cartesia.WIDE
<read-only>

Function Registry

Item
Attributes
Cartesia.bearingFrom(ax, ay, bx, by) → Number
-
Cartesia.bezierCurveLength(bezier) → Number
-
Cartesia.bezierGetEPoints(intervals, bezier, callback) → Array<Number>
-
Cartesia.bezierGetTPoints(intervals, bezier, callback) → Array<Number>
-
Cartesia.bezierHullLength(bezier) → Number
-
Cartesia.chordAngle(radius, length) → Number
-
Cartesia.chordLength(radius, angle) → Number
-
Cartesia.clampAngle(radians) → Number
-
Cartesia.clampAngleToPI(radians) → Number
-
Cartesia.cp2pt(cp) → Cartesia.Point
-
Cartesia.cpv2pts(cpv) → Array<Cartesia.Point> or Null
-
Cartesia.d2angle(d) → Cartesia.Angle
-
Cartesia.d2r(r) → Number
-
Cartesia.d2s(r) → Number
-
Cartesia.dabFrom(ax, ay, bx, by) → Array<Number>
-
Cartesia.distanceFrom(ax, ay, bx, by) → Number
-
Cartesia.dxyBearing(dx, dy) → Number
-
Cartesia.dxyDAB(dx, dy) → Array<Number>
-
Cartesia.dxyDistance(dx, dy) → Number
-
Cartesia.ensureAngle(angle) → Cartesia.Angle ⇏ ArgumentError
-
Cartesia.ensurePoint(point) → Cartesia.Point ⇏ ArgumentError
-
Cartesia.ensurePoints(pt) → Array<Cartesia.Point> ⇏ ArgumentError
-
Cartesia.findCircleArcOrigin(r, x1, y1, x2, y2, large_arc_flag, sweep_flag) → Array<Number>
-
Cartesia.getOrbitPoints(radius, n, cx, cy, first_angle)
-
Cartesia.getPointCoords(point) → Array<Number> ⇏ ArgumentError
-
Cartesia.getRadialPoints(radius, angles, cx, cy) ⇏ ArgumentError
-
Cartesia.getRadians(angle) → Number ⇏ ArgumentError
-
Cartesia.getSpokePoints(radius, n, width, cx, cy, first_angle)
-
Cartesia.newLineSegment(reference, endpt) → Cartesia.Line
-
Cartesia.newRect(point, width, height) → Cartesia.Polygon
-
Cartesia.newSquare(point, size) → Cartesia.Polygon
-
Cartesia.pointBetween(ax, ay, bx, by, ratio) → Array<Number>
-
Cartesia.pointFrom(x, y, d, b) → Array<Number>
-
Cartesia.r2angle(r) → Cartesia.Angle
-
Cartesia.r2d(r) → Number
-
Cartesia.r2s(r) → Number
-
Cartesia.rotatedPointFrom(ax, ay, bx, by, db) → Array<Number>
-
Cartesia.s2angle(s) → Cartesia.Angle
-
Cartesia.s2d(s) → Number
-
Cartesia.s2r(s) → Number
-
Cartesia.u2r(m, uom) → Number ⇏ ArgumentError
-
Cartesia.xy2pt(x, y) → Cartesia.Point
-

Constant Details

Cartesia.CCW   <read-only>

Cartesia.CCWCCW   <read-only>

Cartesia.CCWCW   <read-only>

Cartesia.CUBIC   <read-only>

Cartesia.CW   <read-only>

Cartesia.CWCCW   <read-only>

Cartesia.CWCW   <read-only>

Cartesia.DEGREES   <read-only>

Cartesia.INFINITE   <read-only>

Cartesia.INSIDE   <read-only>

Cartesia.LINE_INFINITE   <read-only>

Cartesia.LINE_SEGMENT   <read-only>

Cartesia.LINE_VECTOR   <read-only>

Cartesia.OUTSIDE   <read-only>

Cartesia.QUADRATIC   <read-only>

Cartesia.RAD0   <read-only>

Cartesia.RAD180   <read-only>

Cartesia.RAD270   <read-only>

Cartesia.RAD360   <read-only>

Cartesia.RAD45   <read-only>

Cartesia.RAD90   <read-only>

Cartesia.RADIANS   <read-only>

Cartesia.SEC0   <read-only>

Cartesia.SEC180   <read-only>

Cartesia.SEC270   <read-only>

Cartesia.SEC360   <read-only>

Cartesia.SEC45   <read-only>

Cartesia.SEC90   <read-only>

Cartesia.SECTONS   <read-only>

Cartesia.TALL   <read-only>

Cartesia.WIDE   <read-only>

Function Details

Cartesia.bearingFrom(ax, ay, bx, by) → Number

This function computes the distance & bearing (angle) between two points given their x,y coordinates.

Parameters:

  • ax [Number] — the x-coordinate of the first point
  • ay [Number] — the y-coordinate of the first point
  • bx [Number] — the x-coordinate of the second point
  • by [Number] — the y-coordinate of the second point

Returns:

  • [Number] — the bearing between the two points in radians

Cartesia.bezierCurveLength(bezier) → Number

This function returns the length of the bezier curve.

Parameters:

  • bezier [Object or Array<Number>] — the bezier curve representation

Returns:

  • [Number] — the bezier curve length

Cartesia.bezierGetEPoints(intervals, bezier, callback) → Array<Number>

This function returns a list of evenly-spaced points along a bezier curve or calls a procedure for each point calculated. The callback's parameters are (nth,value) where nth is the index of the point and the value is the coordinate pair of the point.

Parameters:

  • intervals [Integer] — the number of points to return
  • bezier [Object or Array<Number>] — the bezier curve representation
  • callback [Function] — a function to call as each point is calculated <default: null>

Returns:

  • [Array<Number>] — the coordinates of each point as a coordinate list, if no callback was specified

Cartesia.bezierGetTPoints(intervals, bezier, callback) → Array<Number>

This function returns a list of timed points along a bezier curve or calls a procedure for each point calculated. The callback's parameters are (nth,value) where nth is the index of the point and the value is the coordinate pair of the point.

Parameters:

  • intervals [Integer] — the number of points to return
  • bezier [Object or Array<Number>] — the bezier curve representation
  • callback [Function] — a function to call as each point is calculated <default: null>

Returns:

  • [Array<Number>] — the coordinates of each point as a coordinate list, if no callback was specified

Cartesia.bezierHullLength(bezier) → Number

This function returns the hull length of the bezier curve.

Parameters:

  • bezier [Object or Array<Number>] — the bezier curve representation

Returns:

  • [Number] — the hull length of the bezier curve

Cartesia.chordAngle(radius, length) → Number

This function calculates the angle of a chord of a given length of a circle of a given radius.

Parameters:

  • radius [Number] — the radius of the circle
  • length [Number] — the length of the chord

Returns:

  • [Number] — the angle of the chord in radians

Cartesia.chordLength(radius, angle) → Number

This function calculates the chord length of a circle of a given radius and angle between two points on the circle.

Parameters:

  • radius [Number] — the radius of the circle
  • angle [Number] — the angle, in radians, between two points on the circle

Returns:

  • [Number] — the length of the chord

Cartesia.clampAngle(radians) → Number

This function ensures a radian angle measurement will be between 0° and 360°.

Parameters:

  • radians [Number] — the angle measurement in radians

Returns:

  • [Number] — the angle measurement in radians clamped between 0 and 2π

Cartesia.clampAngleToPI(radians) → Number

This function ensures a radian angle measurement will be between -180° and 180°.

Parameters:

  • radians [Number] — the angle measurement in radians

Returns:

  • [Number] — the angle measurement in radians clamped between -π and π

Cartesia.cp2pt(cp) → Cartesia.Point

This function creates a Cartesia.Point object from a coordinate pair.

Parameters:

  • cp [Array<Number>] — the 2-element coordinate pair

Returns:

  • [Cartesia.Point] — the Cartesia.Point object

Cartesia.cpv2pts(cpv) → Array<Cartesia.Point> or Null

This function creates an array of Cartesia.Point objects from an array of coordinates.

Parameters:

  • cpv [Array<Number>] — the even-sized array of coordinates

Returns:

  • [Array<Cartesia.Point> or Null] — the array of Cartesia.Point objects

Cartesia.d2angle(d) → Cartesia.Angle

This function creates a Cartesia.Angle object with a size in degrees.

Parameters:

  • d [Number] — the size of the angle in degrees

Returns:

  • [Cartesia.Angle] — the Cartesia.Angle object

Cartesia.d2r(r) → Number

This function converts degrees to radians.

Parameters:

  • r [Number] — the angle measurement in degrees

Returns:

  • [Number] — the angle measurement in radians

Cartesia.d2s(r) → Number

This function converts degrees to sectons.

Parameters:

  • r [Number] — the angle measurement in degrees

Returns:

  • [Number] — the angle measurement in sectons

Cartesia.dabFrom(ax, ay, bx, by) → Array<Number>

This function computes the bearing (angle) between two points given their x,y coordinates.

Parameters:

  • ax [Number] — the x-coordinate of the first point
  • ay [Number] — the y-coordinate of the first point
  • bx [Number] — the x-coordinate of the second point
  • by [Number] — the y-coordinate of the second point

Returns:

  • [Array<Number>] — the distance & bearing between the two points, the latter in radians

Cartesia.distanceFrom(ax, ay, bx, by) → Number

This function computes the distance between two points given their x,y coordinates.

Parameters:

  • ax [Number] — the x-coordinate of the first point
  • ay [Number] — the y-coordinate of the first point
  • bx [Number] — the x-coordinate of the second point
  • by [Number] — the y-coordinate of the second point

Returns:

  • [Number] — the direct distance between two points

Cartesia.dxyBearing(dx, dy) → Number

This function computes the bearing (angle) between two points given their dx and dy distances.

Parameters:

  • dx [Number] — the x-axis distance between two points
  • dy [Number] — the y-axis distance between two points

Returns:

  • [Number] — the bearing between the two points in radians

Cartesia.dxyDAB(dx, dy) → Array<Number>

This function computes the distance & bearing (angle) between two points given their dx and dy distances.

Parameters:

  • dx [Number] — the x-axis distance between two points
  • dy [Number] — the y-axis distance between two points

Returns:

  • [Array<Number>] — the distance & bearing between the two points, the latter in radians

Cartesia.dxyDistance(dx, dy) → Number

This function computes the distance between two points given their dx and dy distances.

Parameters:

  • dx [Number] — the x-axis distance between two points
  • dy [Number] — the y-axis distance between two points

Returns:

  • [Number] — the direct distance between two points

Cartesia.ensureAngle(angle) → Cartesia.Angle ⇏ ArgumentError

This function is used throughout Cartesia to normalize angle representations to Cartesia.Angle object(s).

Parameters:

  • angle [Cartesia.Angle or Number] — the angle argument as a Cartesia.Angle object or a measurement in radians

Returns:

  • [Cartesia.Angle] — the Cartesia.Angle object to work on

Throws:

  • [ArgumentError] — if the angle representation is invalid.

Cartesia.ensurePoint(point) → Cartesia.Point ⇏ ArgumentError

This function is used throughout Cartesia to normalize point representations to Cartesia.Point object(s).

Parameters:

  • point [Variadic] — a point representation (see Cartesia.Point documentation)

Returns:

  • [Cartesia.Point] — the Cartesia.Point object to work on

Throws:

  • [ArgumentError] — if the point representation is invalid.

Cartesia.ensurePoints(pt) → Array<Cartesia.Point> ⇏ ArgumentError

This function is used throughout Cartesia to normalize multiple point representations to Cartesia.Point object(s).

Parameters:

  • pt [Array<Cartesia.Point> or Array<Number>] — the points argument as an array of Cartesia.Points or as an even-length array of coordinates

Returns:

  • [Array<Cartesia.Point>] — the Cartesia.Point objects to work on

Throws:

  • [ArgumentError] — if the points representation is invalid.

Cartesia.findCircleArcOrigin(r, x1, y1, x2, y2, large_arc_flag, sweep_flag) → Array<Number>

This function calculates the origin of a circle given an arc described using endpoints, the circle's radius, whether it's a large arc and its sweep direction.

Parameters:

  • r [Number] — the radius of the circle
  • x1 [Number] — the x-coordinate of the first end point
  • y1 [Number] — the y-coordinate of the first end point
  • x2 [Number] — the x-coordinate of the second end point
  • y2 [Number] — the y-coordinate of the second end point
  • large_arc_flag [Boolean] — true, if the arc goes "the long way around" between the two end points
  • sweep_flag [Boolean] — true, if the arc direction is counter-clockwise

Returns:

  • [Array<Number>] — the x,y coordinates of the circle's origin

Cartesia.getOrbitPoints(radius, n, cx, cy, first_angle)

This function calculates equidistant points along a circular path at a given radius and number of points

Parameters:

  • radius [Number] — the radius of the circle
  • n [Number] — the number of equidistant points to calculate
  • cx [Number] — the x-coordinate of the center or origin point
  • cy [Number] — the y-coordinate of the center or origin point
  • first_angle [Number] — the starting angle

Cartesia.getPointCoords(point) → Array<Number> ⇏ ArgumentError

This function is used to get x,y coordinates regardless of point representation.

Parameters:

  • point [Variadic] — a point representation (see Cartesia.Point documentation)

Returns:

  • [Array<Number>] — an array containing the x,y coordinates

Throws:

  • [ArgumentError] — if the point representation is invalid or unrecognized

Cartesia.getRadialPoints(radius, angles, cx, cy) ⇏ ArgumentError

This function calculates points along a circlar path at a given radius and at given angles

Parameters:

  • radius [Number] — the radius of the circle
  • angles [Array<Number>] — the angles from the origin point where the points are to be calculated
  • cx [Number] — the x-coordinate of the center or origin point
  • cy [Number] — the y-coordinate of the center or origin point

Throws:

  • [ArgumentError] — if the angles representation is invalid or unrecognized

Cartesia.getRadians(angle) → Number ⇏ ArgumentError

This function gets a radian measurement from a variety of angle representations.

Parameters:

  • angle [Variadic] — the angle representation (see Cartesia.Angle documentation)

Returns:

  • [Number] — the radian measurement of the angle

Throws:

  • [ArgumentError] — if the angle representation is invalid or unrecognized

Cartesia.getSpokePoints(radius, n, width, cx, cy, first_angle)

This function calculates points along a circular path at a given radius and number of spokes and width of each spoke

Parameters:

  • radius [Number] — the radius of the circle
  • n [Number] — the number of equidistant points to calculate to pin the center of each spoke
  • width [Number] — the width of each spoke
  • cx [Number] — the x-coordinate of the center or origin point
  • cy [Number] — the y-coordinate of the center or origin point
  • first_angle [Number] — the starting angle

Cartesia.newLineSegment(reference, endpt) → Cartesia.Line

This function creates a new Cartesia.Line object which is a line segment composed of two points.

Parameters:

  • reference [Cartesia.Point] — the starting point of the line segment
  • endpt [Cartesia.Point] — the end point of the line segment

Returns:

  • [Cartesia.Line] — the Cartesia.Line object

Cartesia.newRect(point, width, height) → Cartesia.Polygon

This function creates a new Cartesia.Polygon object which is a rectangle of a given size.

Parameters:

  • point [Cartesia.Point] — the location of the rectangle
  • width [Number] — the width of the rectangle
  • height [Number] — the height of the rectangle

Returns:

  • [Cartesia.Polygon] — the Cartesia.Polygon object

Cartesia.newSquare(point, size) → Cartesia.Polygon

This function creates a new Cartesia.Polygon object which is a square of a given size.

Parameters:

  • point [Cartesia.Point] — the location of the square
  • size [Number] — the size of the square

Returns:

  • [Cartesia.Polygon] — the Cartesia.Polygon object

Cartesia.pointBetween(ax, ay, bx, by, ratio) → Array<Number>

This function computes the location of a point which is a proportional distance between the two given points.

Parameters:

  • ax [Number] — the x-coordinate of the first point
  • ay [Number] — the y-coordinate of the first point
  • bx [Number] — the x-coordinate of the second point
  • by [Number] — the y-coordinate of the second point
  • ratio [Number] — the percentage, as a value from 0.0 to 1.0, from the first point along a line to the second point <default: 0.5>

Returns:

  • [Array<Number>] — the x,y coordinates of the point in between

Cartesia.pointFrom(x, y, d, b) → Array<Number>

This function computes the point which is a distance and bearing from the given point, given its x,y coordinates.

Parameters:

  • x [Number] — the x-coordinate of the point
  • y [Number] — the y-coordinate of the point
  • d [Number] — the distance the second point will be from the given point
  • b [Number] — the bearing, in radians, the second point will be from the given point

Returns:

  • [Array<Number>] — the x,y coordinates of the second point

Cartesia.r2angle(r) → Cartesia.Angle

This function is used throughout Cartesia to normalize angle representations to Cartesia.Angle object(s).

Parameters:

  • r [Number] — the size of the angle in radians

Returns:

  • [Cartesia.Angle] — the Cartesia.Angle object

Cartesia.r2d(r) → Number

This function converts radians to degrees.

Parameters:

  • r [Number] — the angle measurement in radians

Returns:

  • [Number] — the angle measurement in degrees

Cartesia.r2s(r) → Number

This function converts radians to sectons.

Parameters:

  • r [Number] — the angle measurement in radians

Returns:

  • [Number] — the angle measurement in sectons

Cartesia.rotatedPointFrom(ax, ay, bx, by, db) → Array<Number>

This function computes the location of a point which is a distance and bearing from the first point and based on a second point moving radially by a given angle.

Parameters:

  • ax [Number] — the x-coordinate of the first point
  • ay [Number] — the y-coordinate of the first point
  • bx [Number] — the x-coordinate of the second point
  • by [Number] — the y-coordinate of the second point
  • db [Number] — the delta angular measurement, in radians

Returns:

  • [Array<Number>] — the x,y coordinates of the third point

Cartesia.s2angle(s) → Cartesia.Angle

This function creates a Cartesia.Angle object with a size in sectons.

Parameters:

  • s [Number] — the size of the angle in sectons

Returns:

  • [Cartesia.Angle] — the Cartesia.Angle object

Cartesia.s2d(s) → Number

This function converts sectons to degrees.

Parameters:

  • s [Number] — the angle measurement in sectons

Returns:

  • [Number] — the angle measurement in degrees

Cartesia.s2r(s) → Number

This function converts sectons to radians.

Parameters:

  • s [Number] — the angle measurement in sectons

Returns:

  • [Number] — the angle measurement in radians

Cartesia.u2r(m, uom) → Number ⇏ ArgumentError

This function converts a given angular measurement into radians.

Parameters:

  • m [Number] — the number of units
  • uom [Symbol] — one of { Cartesia.RADIANS,Cartesia.DEGREES,Cartesia,SECTONS } <default: Cartesia.RADIANS>

Returns:

  • [Number] — the angular measurement in radians

Throws:

  • [ArgumentError] — if the unit of measurement is unrecognized

Cartesia.xy2pt(x, y) → Cartesia.Point

This function creates a Cartesia.Point object from x,y coordinates.

Parameters:

  • x [Number] — the x-coordinate of the point
  • y [Number] — the y-coordinate of the point

Returns:

  • [Cartesia.Point] — the Cartesia.Point object

Class: Cartesia.Angle

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
angle.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all angle-based calculations, including units of measure conversions.

Angle Representations

Raw angle representations used to create and/or operate on this class can come in many forms:
  • Cartesia.Angle
  • a 1-element or 2-element array of numerical units and an optional unit of measurement type
  • numerical units and an optional unit of measurement type as separate arguments

This multitude of representations leads to the use of variadic arguments for the functions.

Sectons

One unique aspect of the library is an angle unit of measurement called a secton. Whereas radians use floating point numbers between 0 and 2π and degrees use numbers between 0 and 360, and can be integers or floating point, the secton is designed to be an integral unit between 0 and 64800. The upper limit was designed to fit within a 16-bit integer. One secton equals 1/180° and has a good enough granularity for most digital graphics applications.

Constructor Registry

Item
Attributes
new Cartesia.Angle(angle)
-

Property Registry

Item
Attributes
degrees
-
sections
-

Method Registry

Item
Attributes
add(angle) → Cartesia.Angle
-
add$(angle) → Cartesia.Angle
-
clone() → Cartesia.Angle
-
delta() → Cartesia.Angle
-
delta$() → Cartesia.Angle
-
difference(angle) → Number
-
reflectAroundPI() → Cartesia.Angle
-
reflectAroundPI$() → Cartesia.Angle
-
reflectTowardZero() → Cartesia.Angle
-
reflectTowardZero$() → Cartesia.Angle
-
set(angle) → Cartesia.Angle
-
toString() → String
-
valueOf() → Number
-

Constructor Details

new Cartesia.Angle(angle)

Parameters:

  • angle [Variadic] — the initial value of the angle <default: 0.0>

Property Details

degrees

sections

Method Details

add(angle) → Cartesia.Angle

This method creates a new Cartesia.Angle by adding another angle to this angle.

Parameters:

  • angle [Variadic] — the initial value of the angle <default: 0.0>

Returns:

  • [Cartesia.Angle] — a new Cartesia.Angle object

add$(angle) → Cartesia.Angle

This method adds an angle to this one.

Parameters:

  • angle [Variadic] — the initial value of the angle <default: 0.0>

Returns:

  • [Cartesia.Angle] — itself

clone() → Cartesia.Angle

This function returns a new Cartesia.Angle with the same values.

Returns:

  • [Cartesia.Angle] — the new Cartesia.Angle object

delta() → Cartesia.Angle

This method creates a new Cartesia.Angle which contains an angle which is represented as a difference measurement.

Returns:

  • [Cartesia.Angle] — the new Cartesia.Angle object

delta$() → Cartesia.Angle

This method ensures that the angle is represented as a difference measurement.

Returns:

  • [Cartesia.Angle] — itself

difference(angle) → Number

This method calculates the difference between this angle and another one, in radians.

Parameters:

  • angle [Variadic] — the initial value of the angle <default: 0.0>

Returns:

  • [Number] — the difference between the two angles

reflectAroundPI() → Cartesia.Angle

This method creates a new Cartesia.Angle which contains an angle which is a reflection between 0° and 180°.

Returns:

  • [Cartesia.Angle] — the new Cartesia.Angle object

reflectAroundPI$() → Cartesia.Angle

This method ensures that the angle is reflection between 0° and 180°.

Returns:

  • [Cartesia.Angle] — itself

reflectTowardZero() → Cartesia.Angle

This method creates a new Cartesia.Angle which contains an angle which is a reflection between 270° and 90° toward 0°.

Returns:

  • [Cartesia.Angle] — the new Cartesia.Angle object

reflectTowardZero$() → Cartesia.Angle

This method ensures that the angle is reflected between 270° and 90° toward 0°.

Returns:

  • [Cartesia.Angle] — itself

set(angle) → Cartesia.Angle

This method sets the angle's value.

Parameters:

  • angle [Variadic] — the value of the angle to set <default: 0.0>

Returns:

  • [Cartesia.Angle] — itself

toString() → String

This method returns a string representation of the angle.

Returns:

  • [String] — the string representation

valueOf() → Number

This method returns the numerical value of the angle, in radians.

Returns:

  • [Number] — the value of the angle, in radians

Class: Cartesia.Arc ← Cartesia.Circle

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
arc.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all arc-based calculations.

Constructor Registry

Item
Attributes
new Cartesia.Arc(center, radius, bearing_slice) ⇏ ArgumentError
-

Method Registry

Item
Attributes
intersectionWithArc(arc) → Array<Cartesia.Point> or Symbol
-
intersectionWithCircle(circle) → Array<Cartesia.Point> or Symbol
-
intersectionWithLine(line) → Array<Cartesia.Point> or Symbol ⇏ ArgumentError
-
toString() → String
-

Constructor Details

new Cartesia.Arc(center, radius, bearing_slice) ⇏ ArgumentError

Parameters:

  • center [Number] — the center point location of the arc
  • radius [Number] — the radius of the circle of which the arc is a subset
  • bearing_slice [Array<Cartesia.Angle>] — the two angles that mark the end points of the arc

Throws:

  • [ArgumentError] — if the bearing angle is invalid or unrecognized

Method Details

intersectionWithArc(arc) → Array<Cartesia.Point> or Symbol

This method determines the the intersection points between the arc and a given arc.

Parameters:

  • arc [Cartesia.Circle] — the arc this arc will intersect with

Returns:

  • [Array<Cartesia.Point> or Symbol] — the array of points where the arc intersects with this arc or a symbol denoting whether the arc is outside of this arc

intersectionWithCircle(circle) → Array<Cartesia.Point> or Symbol

This method determines the the intersection points between this arc and a given circle.

Parameters:

  • circle [Cartesia.Circle] — the circle this arc will intersect with

Returns:

  • [Array<Cartesia.Point> or Symbol] — the array of points where the circle intersects with this arc or a symbol denoting whether the circle is outside of this arc

intersectionWithLine(line) → Array<Cartesia.Point> or Symbol ⇏ ArgumentError

This method determines the points on an arc which intersect with the given line.

Parameters:

  • line [Cartesia.Line] — the line this arc will intersect with

Returns:

  • [Array<Cartesia.Point> or Symbol] — the array of points where the line intersects with this arc or a symbol denoting whether the line is outside of this arc

Throws:

  • [ArgumentError] — if the line is invalid

toString() → String

This method returns a string representation of the arc.

Returns:

  • [String] — the string representation

Class: Cartesia.Bezier

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
bezier.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all bezier-based calculations.

Constructor Registry

Item
Attributes
new Cartesia.Bezier(points) ⇏ ArgumentError
-

Property Registry

Item
Attributes
length
-

Method Registry

Item
Attributes
ePoints(intervals, callback) → Array<Cartesia.Point>
-
isValid() → Boolean
-
tPoints(intervals, callback) → Array<Cartesia.Point>
-

Constructor Details

new Cartesia.Bezier(points) ⇏ ArgumentError

Parameters:

  • points [Array<Cartesia.Point>] — the 3 points of a quadratic or the 4 points of a cubic bezier curve

Throws:

  • [ArgumentError] — if the points are invalid or unrecognizable

Property Details

length

Method Details

ePoints(intervals, callback) → Array<Cartesia.Point>

This method either returns a list of equidistant-points or calls a procedure for each equidistant-point.

Parameters:

  • intervals [Integer] — the number of equidistant points along the curve to collect, visit
  • callback [Function] — the callback function to call for each equidistant point <default: null>

Returns:

  • [Array<Cartesia.Point>] — if the equidistant points are being collected

isValid() → Boolean

This method determines if the bezier contains valid information

Returns:

  • [Boolean] — true, if the type is Cartesia.QUADRATIC or Cartesia.CUBIC

tPoints(intervals, callback) → Array<Cartesia.Point>

This method either returns a list of time-points or calls a procedure for each time-point.

Parameters:

  • intervals [Integer] — the number of time points along the curve to collect, visit
  • callback [Function] — the callback function to call for each time point <default: null>

Returns:

  • [Array<Cartesia.Point>] — if the time points are being collected

Class: Cartesia.Catenary

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
catenary.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all catenary-based calculations. The how-to of catenary curve mathematics will be added later.

See Also: https://www.britannica.com/science/catenary

Constructor Registry

Item
Attributes
new Cartesia.Catenary(definition)
-

Property Registry

Item
Attributes
isTracking
-

Method Registry

Item
Attributes
$calcAGivenDXPhi(dx, phi) → Number
<private>
$calcAGivenDyPhi(dy, phi) → Number
<private>
$calcAGivenDydx(dy, dx, prec) → Number
<private>
$ctTrackPoint(is_first, pt, distance, precision) → Cartesia.Point
<private>
ctFirst(point, distance_from) → Cartesia.Point ⇏ Error
-
ctNext(distance_from) → Cartesia.Point ⇏ Error
-
dxAtDY(dy) → Number
-
dyAtDX(dx) → Number
-
finishCurveTracking()
-
phiAtDX(dx) → Number
-
phiAtDY(dy) → Number
-
sAtDX(dx) → Number
-
sAtDY(dy) → Number
-
startCurveTracking(anchor, dx, style, direction)
-
toString() → String
-

Constructor Details

new Cartesia.Catenary(definition)

This constructor will define a catenary curve based on a factor a, where y = a at x = 0, if a chain will drop to its lowest point at x = 0. The equation y = a cosh(x/a) defines the curve. The factor 'a', can be explictly given or it can be derived from dx, dy and/or phi values. Only two of the three values of dx, dy or phi need be supplied to calculate 'a'.

Parameters:

  • definition [Object] — the parameters of the catenary curve
    • a [Cartesia.Point] — the anchor point
    • dx [Number] — the x-axis distance between the anchor point and the lowest point of the curve
    • dy [Number] — the y-axis distance between the anchor point and the lowest point of the curve
    • phi [Number] — the angle of descent from the anchor point

Property Details

isTracking

Method Details

$calcAGivenDXPhi(dx, phi) → Number   <private>

This private method calculates 'a' based on the given dx and phi parameters.

Parameters:

  • dx [Number] — the x-axis distance between the curve's anchor point and its end point
  • phi [Number] — the curve's angle of departure from the anchor point

Returns:

  • [Number] — the curve's a factor

$calcAGivenDyPhi(dy, phi) → Number   <private>

This private method calculates 'a' based on the given dy and phi parameters.

Parameters:

  • dy [Number] — the y-axis distance between the curve's anchor point and its end point
  • phi [Number] — the curve's angle of departure from the anchor point

Returns:

  • [Number] — the curve's a factor

$calcAGivenDydx(dy, dx, prec) → Number   <private>

This private method calculates 'a' based on the given dx and dy parameters.

Parameters:

  • dy [Number] — the y-axis distance between the curve's anchor point and its end point
  • dx [Number] — the x-axis distance between the curve's anchor point and its end point
  • prec [Number] — the calculation precision <default: 10>

Returns:

  • [Number] — the curve's a factor

$ctTrackPoint(is_first, pt, distance, precision) → Cartesia.Point   <private>

This private method calculates the curve tracking points based on the procedure's current state

Parameters:

  • is_first [Boolean] — true, if we are calculating the first point
  • pt [Cartesia.Point] — the point we are calculating from
  • distance [Number] — the distance away from the given point we are calculating for
  • precision [Number] — the level of precision we are limiting the calculations to <default: Cartesia.CatenaryPrecision>

Returns:

  • [Cartesia.Point] — the next point on the curve

ctFirst(point, distance_from) → Cartesia.Point ⇏ Error

This method gets the first point in the curve tracking operation.

Parameters:

  • point [Cartesia.Point] — a starting point not part of the curve <default: null>
  • distance_from [Number] — a distance from the specified point <default: null>

Returns:

  • [Cartesia.Point] — the first point in the curve

Throws:

  • [Error] — if the operation has not been started

ctNext(distance_from) → Cartesia.Point ⇏ Error

This method gets the next point in the curve tracking operation.

Parameters:

  • distance_from [Number] — a distance from the current point <default: null>

Returns:

  • [Cartesia.Point] — the next point in the curve

Throws:

  • [Error] — if the operation has not been started

dxAtDY(dy) → Number

This method returns the dx value at a point dy from the anchor point.

Parameters:

  • dy [Number] — the dy value

Returns:

  • [Number] — the dx value

dyAtDX(dx) → Number

This method returns the dy value at a point dx from the anchor point.

Parameters:

  • dx [Number] — the dx value

Returns:

  • [Number] — the dy value

finishCurveTracking()

This method ends the current curve tracking operation.

phiAtDX(dx) → Number

This method returns the phi value at a point dx from the anchor point.

Parameters:

  • dx [Number] — the dx value

Returns:

  • [Number] — the phi value

phiAtDY(dy) → Number

This method returns the phi value at a point dy from the anchor point.

Parameters:

  • dy [Number] — the dy value

Returns:

  • [Number] — the phi value

sAtDX(dx) → Number

This method returns the s value at a point dx from the anchor point.

Parameters:

  • dx [Number] — the dx value

Returns:

  • [Number] — the s value

sAtDY(dy) → Number

This method returns the s value at a point dy from the anchor point.

Parameters:

  • dy [Number] — the dy value

Returns:

  • [Number] — the s value

startCurveTracking(anchor, dx, style, direction)

This method starts an iterative curve tracking operation between an anchor point and the end point.

Parameters:

  • anchor [Cartesia.Point] — the anchor point of the curve
  • dx [Number] — the dx distance
  • style [Symbol] — the tracking methodology: { Cartesia.ByPX, Cartesia.ByNX, Cartesia.ByInvPX, Cartesia.ByInvNX }
  • direction [Symbol] — the direction of the tracking: { Cartesia.A2E, Cartesia.E2A }

toString() → String

This method returns a string representation of the catenary curve object.

Returns:

  • [String] — the string representation

Class: Cartesia.ChainWrap

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
chainwrap.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all chain-wrap-based calculations.

Constructor Registry

Item
Attributes
new Cartesia.ChainWrap(bogies, style, link_properties, offset, catgrav_hints) ⇏ ArgumentError ⇏ Error
-

Property Registry

Item
Attributes
pathinfo
-

Method Registry

Item
Attributes
$calcLinkLength(links_per_tooth) → Number
<private>
$makeCircleFromBogie(bogie) → Cartesia.Circle
<private>
harvest(dbo) → Array<Cartesia.Point>
-

Constructor Details

new Cartesia.ChainWrap(bogies, style, link_properties, offset, catgrav_hints) ⇏ ArgumentError ⇏ Error

Parameters:

  • bogies [Array<Object>] — the bogies of the tank tread
    • type [Symbol] — the type of bogie: { Cartesia.DRIVE_BOGIE, Cartesia.ROAD_BOGIE, Cartesia.TOP_BOGIE, Cartesia.REAR_BOGIE, Cartesia.TENSION_BOGIE }
    • cx [Number] — the x-coordinate of the center of the bogie
    • cy [Number] — the y-coordinate of the center of the bogie
    • r [Number] — the radius of the center of the bogie
  • style [Symbol] — the style of chain wrapping: { Cartesia.TAUT, Cartesia.CATGRAV }
  • link_properties [Object] — the properties of each link in the chain, tank tread
    • thickness [Number] — the thickness of the link
    • length [Number] — the length of the link <default: null>
  • offset [Array<Number>] — <default: [ 0,0 ]>
  • catgrav_hints [Object] — , if using Cartesia.CATGRAV style <default: null>

Throws:

  • [ArgumentError] — if the style, link_properties or catgrav_hints are invalid or unrecognizable
  • [Error] — if the link length is not given and cannot be calculated

Property Details

pathinfo

Method Details

$calcLinkLength(links_per_tooth) → Number   <private>

This private method determines the size of the link based on the size of the drive bogie and the number of links/tooth.

Parameters:

  • links_per_tooth [Integer] — the number of links per tooth <default: 1>

Returns:

  • [Number] — the link length

$makeCircleFromBogie(bogie) → Cartesia.Circle   <private>

This private method make a circle for a particular bogie based on the bogie's size and location and the overall offset and chain link size.

Parameters:

  • bogie [Object] — the specified bogie

Returns:

  • [Cartesia.Circle] — a circle describing the bogie

harvest(dbo) → Array<Cartesia.Point>

This method collects all of the points of the wrapped chain path around the bogies.

Parameters:

  • dbo [Integer] — <default: 50>

Returns:

  • [Array<Cartesia.Point>] — the collections of points making up the wrapped chain path

Class: Cartesia.Circle

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
circle.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all circle-based calculations.

Constructor Registry

Item
Attributes
new Cartesia.Circle(center, radius)
-

Method Registry

Item
Attributes
boundingBox() → Cartesia.Polygon
-
clone() → Cartesia.Circle
-
closestIntersectionPointFromPoint(point) → Cartesia.Point
-
distanceFromPoint(point) → Number
-
getChordAngleByLength(length) → Cartesia.Angle
-
getChordLengthByAngle(angle) → Number
-
getChordLengthByNSegs(nsegs) → Number
-
getChordPointsByLength(length, direction, first_angle) → Array<Cartesia.Point>
-
getChordPointsByN(npts, first_angle) → Array<Cartesia.Point> ⇏ ArgumentError
-
getPoint(angle) → Cartesia.Point
-
getTangentLineBetweenCircles(circle, connection) → Array<Cartesia.Line>
-
getTangentVectors(bearing) → Array<Cartesia.Line>
-
intersectionWithCircle(circle) → Array<Cartesia.Point> or Symbol ⇏ ArgumentError
-
intersectionWithLine(line) → Array<Cartesia.Point> or Symbol ⇏ ArgumentError
-
isPointInside(point) → Boolean
-
toString() → String
-

Constructor Details

new Cartesia.Circle(center, radius)

Parameters:

  • center [Cartesia.Point] — the location of the center point of the circle
  • radius [Number] — the radius of the circle

Method Details

boundingBox() → Cartesia.Polygon

This method returns the bounding box of the circle.

Returns:

  • [Cartesia.Polygon] — the square which makes up the circle's bounding box

clone() → Cartesia.Circle

This method creates a new circle identical to this one.

Returns:

  • [Cartesia.Circle] — the new circle

closestIntersectionPointFromPoint(point) → Cartesia.Point

This method determines the point on the circle which is closest to the specified point.

Parameters:

  • point [Variadic] — the specified point

Returns:

  • [Cartesia.Point] — the point on the circle closest to the specified point

distanceFromPoint(point) → Number

This method determines the distance from the point on the circle which is closest to the specified point.

Parameters:

  • point [Variadic] — the specified point

Returns:

  • [Number] — the distance between the point on the circle closest to the specified point

getChordAngleByLength(length) → Cartesia.Angle

This method returns the angle of the circle's chord as defined by its length.

Parameters:

  • length [Number] — the chord length

Returns:

  • [Cartesia.Angle] — the angle of the chord

getChordLengthByAngle(angle) → Number

This method returns the length of the circle's chord based on the angle separating the points from the center point.

Parameters:

  • angle [Cartesia.Angle] — the angle separating the points and determining the chord's length

Returns:

  • [Number] — the length of the chord

getChordLengthByNSegs(nsegs) → Number

This method returns the length of the circle's chord based a number of equidistant chords running around the circle.

Parameters:

  • nsegs [Integer] — the number of segments used to define the size of each equidistant chord

Returns:

  • [Number] — the length of the chord

getChordPointsByLength(length, direction, first_angle) → Array<Cartesia.Point>

This method returns the points on the circle which are a given chord length

Parameters:

  • length [Number] — the chord length
  • direction [Symbol] — the direction around the circle to travel <default: Cartesia.CW>
  • first_angle [Variadic] — the angle from center where the first point will be located <default: 0.0>

Returns:

  • [Array<Cartesia.Point>] — the calculated chord points around the circle

getChordPointsByN(npts, first_angle) → Array<Cartesia.Point> ⇏ ArgumentError

This method returns N points on a circle where they are equidistant from each other.

Parameters:

  • npts [Integer] — the number of points to get
  • first_angle [Cartesia.Angle] — the first angle where the first point will be <default: 0.0>

Returns:

  • [Array<Cartesia.Point>] — the chord points on the circle

Throws:

  • [ArgumentError] — if the specified angle is invalid or unrecognized

getPoint(angle) → Cartesia.Point

This method returns the point at the specified angle from the circle's center.

Parameters:

  • angle [Cartesia.Angle] — the angle from the circle's center point

Returns:

  • [Cartesia.Point] — the point on the circle at the specified angle from the center point

getTangentLineBetweenCircles(circle, connection) → Array<Cartesia.Line>

This method calculates the tangent lines between two circles based on rotation directions around the circles.

Parameters:

  • circle [Cartesia.Circle] — the second circle the tangent lines will connect with
  • connection [Symbol] — the rotation directions around the two circles

Returns:

  • [Array<Cartesia.Line>] — the two tangential lines connecting the two circles

getTangentVectors(bearing) → Array<Cartesia.Line>

This method returns the two tangential lines at a point on the circle bearing at an angle from the center point.

Parameters:

  • bearing [Cartesia.Angle] — the bearing from center

Returns:

  • [Array<Cartesia.Line>] — the two tangential lines emanating from the chosen point

intersectionWithCircle(circle) → Array<Cartesia.Point> or Symbol ⇏ ArgumentError

This method determines the intersection points between a circle and another circle.

Parameters:

  • circle [Cartesia.Circle] — the circle the circle will intersect with

Returns:

  • [Array<Cartesia.Point> or Symbol] — the array of points where the line intersects with the circle or a symbol denoting whether the circle is inside or outside or on top of the circle

Throws:

  • [ArgumentError] — if the circle is invalid

intersectionWithLine(line) → Array<Cartesia.Point> or Symbol ⇏ ArgumentError

This method determines the intersection points between a circle and a line.

Parameters:

  • line [Cartesia.Line] — the line the circle will intersect with

Returns:

  • [Array<Cartesia.Point> or Symbol] — the array of points where the line intersects with the circle or a symbol denoting whether the line is inside or outside of the circle

Throws:

  • [ArgumentError] — if the line is invalid

isPointInside(point) → Boolean

This method is used to determine if a given point is inside the circle.

Parameters:

  • point [Variadic] — the specified point

Returns:

  • [Boolean] — true, if the point is inside the circle

toString() → String

This method returns a string representation of the circle.

Returns:

  • [String] — the string representation

Class: Cartesia.HexCoordinateSystem

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
hexCoordinateSystem.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all hex coordinate system operations.

Constructor Registry

Item
Attributes
new Cartesia.HexCoordinateSystem(cpoint, size, granularity, orientation) ⇏ ArgumentError
-

Method Registry

Item
Attributes
$coordDelta(e, v, constrain) → Array<Number>
<private>
$isConstrained(e, v) → Boolean
<private>
coordsAt(point, constrain) → Cartesia.Point
-
eachPoint(callback)
-
eachPointAlongEdgeAxis(e, callback) ⇏ RangeError
-
isConstrainedPoint(point) → Boolean
-
isEdgePoint(point) → Boolean
-
nvAtE(e) → Integer ⇏ RangeError
-
pointAt(point, constrain) → Cartesia.Point
-
rectangleCoordsAround(point, width, height, constrain) → Array<Array<Number>>
-
rectanglePointsAround(point, width, height, constrain) → Array<Point>
-
rotatedCoord(point, segments) → Array<Number>
-
rotatedPoint(point, segments) → Cartesia.Point
-

Constructor Details

new Cartesia.HexCoordinateSystem(cpoint, size, granularity, orientation) ⇏ ArgumentError

Parameters:

  • cpoint [Cartesia.Point] — the location of the center of the hexagon on the mapped surface
  • size [Number] — the edge-to-edge size of the hexagon
  • granularity [Number] — the spacing between points within the hexagon
  • orientation [Cartesia.WIDE or Cartesia.TALL] — the orientation of the hexagon <default: Cartesia.WIDE>

Throws:

  • [ArgumentError] — if the orientation is invalid or unrecognized

Method Details

$coordDelta(e, v, constrain) → Array<Number>   <private>

This private method converts the HCS coordinates to outside coordinates.

Parameters:

  • e [Integer] — the coordinate point along the e-axis
  • v [Integer] — the coordinate point along the v-axis
  • constrain [Boolean] — whether the given point should be constrained within the hexagon

Returns:

  • [Array<Number>] — the mapped coordinate from the HCS coordinate system to the outside coordinate system

$isConstrained(e, v) → Boolean   <private>

This private method determines if the given point, in e,v notation, is within the hexagon given the user space coordinate limits.

Parameters:

  • e [Integer] — the coordinate point along the e-axis
  • v [Integer] — the coordinate point along the v-axis

Returns:

  • [Boolean] — true if the given point is within the hexagon

coordsAt(point, constrain) → Cartesia.Point

This method converts the hex coordinate point to the user space point.

Parameters:

  • point [Variadic] — the point in the hex coordinate system
  • constrain [Boolean] — true, if conversions outside of the hexagon are not allowed <default: true>

Returns:

  • [Cartesia.Point] — the user space point

eachPoint(callback)

This method calls the supplied callback function for each point in the hexagon.

Parameters:

  • callback [Function] — the callback function

eachPointAlongEdgeAxis(e, callback) ⇏ RangeError

This method calls a callback function for each point along a given edge-oriented axis.

Parameters:

  • e [Integer] — the edge-oriented axis index with 0 running through the hex's center point
  • callback [Function] — the function to call for each point

Throws:

  • [RangeError] — if the e index is outside of the bounds of the granularity of the coordinate system

isConstrainedPoint(point) → Boolean

This method determines if a given point is constrained to the hex area.

Parameters:

  • point [Variadic] — the point to check

Returns:

  • [Boolean] — true if the point is within the hex area

isEdgePoint(point) → Boolean

This method determines if the given point is along the edge of the hexagon's coordinate system.

Parameters:

  • point [Variadic] — the point of the coordinate system

Returns:

  • [Boolean] — true, if the point is along any of the six edges

nvAtE(e) → Integer ⇏ RangeError

This method returns the number of coordinate points along a specified edge-axis row.

Parameters:

  • e [Integer] — the edge-oriented axis index with 0 running through the hex's center point

Returns:

  • [Integer] — the number of coordinate points along that axis

Throws:

  • [RangeError] — if the e index is outside of the bounds of the granularity of the coordinate system

pointAt(point, constrain) → Cartesia.Point

This method converts the hex coordinate point to the user space point.

Parameters:

  • point [Variadic] — the point in the hex coordinate system
  • constrain [Boolean] — true, if conversions outside of the hexagon are not allowed <default: true>

Returns:

  • [Cartesia.Point] — the user space point

rectangleCoordsAround(point, width, height, constrain) → Array<Array<Number>>

This convenience function will return the corner user space coordinates of a rectangle round a given center point.

Parameters:

  • point [Variadic] — the center point of the rectangle
  • width [Integer] — the integer width of the rectangle in user space units
  • height [Integer] — the integer height of the rectangle in user space units
  • constrain [Boolean] — true, if the rectangle's corners are not allowed outside the hexagon <default: true>

Returns:

  • [Array<Array<Number>>] — the 4 coordinates of the rectangle, starting top-left and proceeding clockwise

rectanglePointsAround(point, width, height, constrain) → Array<Point>

This convenience function will return the corner user space coordinates of a rectangle round a given center point.

Parameters:

  • point [Variadic] — the center point of the rectangle
  • width [Integer] — the integer width of the rectangle in user space units
  • height [Integer] — the integer height of the rectangle in user space units
  • constrain [Boolean] — true, if the rectangle's corners are not allowed outside the hexagon <default: true>

Returns:

  • [Array<Point>] — the 4 corner points of the rectangle, starting top-left and proceeding clockwise

rotatedCoord(point, segments) → Array<Number>

This method returns a point matching its location in one of the other five partitions of the hexagon.

Parameters:

  • point [Variadic] — a point in the hex coordinate system
  • segments [Integer] — the number of segments to rotate round in a clockwise direction

Returns:

  • [Array<Number>] — the associated coord in the hex segment

rotatedPoint(point, segments) → Cartesia.Point

This method returns a point matching its location in one of the other five partitions of the hexagon.

Parameters:

  • point [Variadic] — a point in the hex coordinate system
  • segments [Integer] — the number of segments to rotate round in a clockwise direction

Returns:

  • [Cartesia.Point] — the associated point in the hex segment

Class: Cartesia.HexCoordinateSystem.Path

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
hexCoordinateSystem.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all path operation in the hex coordinate system.

Constructor Registry

Item
Attributes
new Cartesia.HexCoordinateSystem.Path(hcs, descriptor, constrained)
-

Method Registry

Item
Attributes
$parse(descriptor) → Hash ⇏ RuntimeError
<private>
isConstrained() → Boolean
-
isValid() → Boolean
-
lastCoord() → Array<Number>
-
lastPoint() → Point
-
mirror(axis, clone) → Cartesia.HexCoordinateSystem.Path
-
normalized() → String
-
render() → String
-
renderAsPolygons() → Array<Hash>
-
reverse(post_process, clone) → Cartesia.HexCoordinateSystem.Path
-
rotate(segments, clone) → Cartesia.HexCoordinateSystem.Path
-
setConstrain(setting)
-
setDescriptor(descriptor) → Boolean
-
toString() → String
-

Constructor Details

new Cartesia.HexCoordinateSystem.Path(hcs, descriptor, constrained)

Parameters:

  • hcs [Cartesia.HexCoordinateSystem] — the hex coordinate system to associate with the path
  • descriptor [String] — the path string descriptor <default: null>
  • constrained [Boolean] — if true, ensures the path is constrained to the hex area <default: true>

Method Details

$parse(descriptor) → Hash ⇏ RuntimeError   <private>

This method parses a proposed path descriptor and stores processing information for later use.

Parameters:

  • descriptor [String] — the proposed path descriptor

Returns:

  • [Hash] — tokenized path information, or null on failure

Throws:

  • [RuntimeError] — on a parsing error

isConstrained() → Boolean

Returns:

  • [Boolean] — true, if the current descriptor is valid

isValid() → Boolean

Returns:

  • [Boolean] — true, if the current descriptor is valid

lastCoord() → Array<Number>

This method returns the last HCS coordinate in the path.

Returns:

  • [Array<Number>] — the last HCS coordinate in the path

lastPoint() → Point

This method returns the last HCS point in the path.

Returns:

  • [Point] — the last HCS point in the path

mirror(axis, clone) → Cartesia.HexCoordinateSystem.Path

This method either clones the current path and mirrors it or mirrors the current path descriptor in place.

Parameters:

  • axis [String] — the x,y or z axis to mirror around <default: 'x'>
  • clone [Boolean] — will return a cloned, rotated descriptor, if true <default: false>

Returns:

  • [Cartesia.HexCoordinateSystem.Path] — this, or a cloned, Cartesia.HexCoordinateSystem.Path instance

normalized() → String

This method returns a string as a normalized path descriptor

Returns:

  • [String] — the normalized path descriptor

render() → String

This method converts this path to a path descriptor that can be rendered onto the underlying surface.

Returns:

  • [String] — the rendered path descriptor

renderAsPolygons() → Array<Hash>

This method converts this path to an array of polygon point arrays, if possible, null if not.

Returns:

  • [Array<Hash>] — an array polygon information, each consisting of an array of points and a Boolean field stating if it is closed

reverse(post_process, clone) → Cartesia.HexCoordinateSystem.Path

This method either clones the current path and reverses it or reverses the current path descriptor in place.

Parameters:

  • post_process [Boolean] — if true, will process the reverse path to convert tokens to use command options <default: false>
  • clone [Boolean] — will return a cloned, rotated descriptor, if true <default: false>

Returns:

  • [Cartesia.HexCoordinateSystem.Path] — this, or a cloned, Cartesia.HexCoordinateSystem.Path instance

rotate(segments, clone) → Cartesia.HexCoordinateSystem.Path

This method either clones the current path and rotates it or rotates the current path descriptor in place.

Parameters:

  • segments [Integer] — the number of 60-degree clockwise rotations to make
  • clone [Boolean] — will return a cloned, rotated descriptor, if true <default: false>

Returns:

  • [Cartesia.HexCoordinateSystem.Path] — this, or a cloned, Cartesia.HexCoordinateSystem.Path instance

setConstrain(setting)

Parameters:

  • setting [Boolean] — sets the constrain paremeter, reparses the descriptor if changing to true

setDescriptor(descriptor) → Boolean

This method sets a new path descriptor.

Parameters:

  • descriptor [String] — the proposed path descriptor

Returns:

  • [Boolean] — true, if the current descriptor is valid

toString() → String

This method converts the Cartesia.HexCoordinateSystem.Path to a string representation.

Returns:

  • [String] — the string representation of the path.

Namespace: Cartesia.HexGeometry

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
hexGeometry.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This namespace encapsulates all HexGeometry features and functions.

Function Registry

Item
Attributes
ee2vv(size) → Number
-
getTallVertexOffsetPoints(size, cx, cy, size) → Hash
-
getVertexOffsetInfo(size, is_edge_size) → Hash
-
getVertexOffsets(size, is_edge_size) → Array<Number>
-
getWideVertexOffsetPoints(size, cx, cy, size) → Hash
-
vv2ee(size) → Number
-

Function Details

ee2vv(size) → Number

This function calculates the vector-to-vector size given the edge-to-edge size of a hexagon.

Parameters:

  • size [Number] — the edge-to-edge hexagon size

Returns:

  • [Number] — the vector-to-vector size of the hexagon

getTallVertexOffsetPoints(size, cx, cy, size) → Hash

This function calculates the vertex offsets from the center of the hexagon given its edge-to-edge size.

Parameters:

  • size [Number] — the hexagon size
  • cx [Number] — the x-coordinate of the hexagon center <default: 0.0>
  • cy [Number] — the y-coordinate of the hexagon center <default: 0.0>
  • size [Boolean] — true if the given size is edge-to-edge <default: true>

Returns:

  • [Hash] — a hash containing size and vertex offset information

getVertexOffsetInfo(size, is_edge_size) → Hash

This function calculates the vertex offsets from the center of the hexagon given its edge-to-edge size.

Parameters:

  • size [Number] — the hexagon size
  • is_edge_size [Boolean] — true if the given size is edge-to-edge <default: true>

Returns:

  • [Hash] — a hash containing size and vertex offset information

getVertexOffsets(size, is_edge_size) → Array<Number>

This function calculates the vertex offset dimensions given an edge-to-edge size.

Parameters:

  • size [Number] — the edge-to-edge hexagon size
  • is_edge_size [Boolean] — true if the given size is edge-to-edge <default: true>

Returns:

  • [Array<Number>] — a 3-element array containing offsets: offset to the edges, offset to the extreme vertices, offset to the edge vertices

getWideVertexOffsetPoints(size, cx, cy, size) → Hash

This function calculates the vertex offsets from the center of the hexagon given its edge-to-edge size.

Parameters:

  • size [Number] — the hexagon size
  • cx [Number] — the x-coordinate of the hexagon center <default: 0.0>
  • cy [Number] — the y-coordinate of the hexagon center <default: 0.0>
  • size [Boolean] — true if the given size is edge-to-edge <default: true>

Returns:

  • [Hash] — a hash containing size and vertex offset information

vv2ee(size) → Number

This function calculates the edge-to-edge size given the vector-to-vector size of a hexagon.

Parameters:

  • size [Number] — the vector-to-vector hexagon size

Returns:

  • [Number] — the edge-to-edge size of the hexagon

Class: Cartesia.HexMapInfo

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
hexMapInfo.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all hexagon map operations.

Constructor Registry

Item
Attributes
new Cartesia.HexMapInfo(cols, rows, hborder, vborder) ⇏ ArgumentError
-

Method Registry

Item
Attributes
$directionToInteger(direction) → Integer
<private>
bboxAt(hexcol, hexrow) → Object
-
buildHexPathDescriptor(params) → Array<Hash>
-
calcHexPathBounds(params) → Hash
-
coordAt(hexcol, hexrow) → Object
-
draw(callback)
-
formatHexPathDescriptor(desc, formatter, needs_bbox) → Hash ⇏ ArgumentError
-
getAdjacentTiles(hexcol, hexrow) → Array<Hash or Null>] the coordinates of the six adjacent hex tiles, in order of [ col,row-1
-
getAlignment(hexcol, hexrow, hexcol2, hexrow2) → Hash or Null
-
getSpineAlignment(hexcol, hexrow, hexcol2, hexrow2, extended) → Hash or Null
-
hcsFor(hexcol, hexrow, granularity) → Cartesia.HexCoordinateSystem
-
hexesAway(hexcol, hexrow, to_hexcol, to_hexrow) → Number
-
hextantsAway(hexcol, hexrow, to_hexcol, to_hexrow) → Array<String>] the hextant locations of the distant hex tile from the origin: [ 'nw','w','sw','ne','e','se'
-
isAdjacent(hexcol, hexrow, hexcol2, hexrow2) → Integer
-
makeCirclePath(params, needs_bbox) → Hash
-
makeHexPath(params, needs_bbox) → Hash
-
makeHexPathCoords(params, needs_bbox) → Hash
-
makePathInHex(params, needs_bbox) → Hash
-
mapdims() → Array<Number>
-
nearestHexTo(point) → Object
-
traceHexPathDescriptor(params, debug) → Array<Hash>
-
visitNextTile(hexcol, hexrow, direction, unclipped) → Array<Hash> or Null
-
visitTiles(hexcol, hexrow, n, direction, callback) → Array<Hash> or Null
-

Constructor Details

new Cartesia.HexMapInfo(cols, rows, hborder, vborder) ⇏ ArgumentError

Parameters:

  • cols [Number] — the number of hexagon columns in the map
  • rows [Number] — the number of hexagon rows in the map
  • hborder [Number] — the size of the horizontal borders (top & bottom)
  • vborder [Number] — the size of the vertical borders (left & right)

Throws:

  • [ArgumentError] — if the orientation is invalid or unrecognizable

Method Details

$directionToInteger(direction) → Integer   <private>

This private method converts a valid wide hex edge direction string to an integer.

Parameters:

  • direction [String] — the direction string descriptions

Returns:

  • [Integer] — an integer ranging from 0 to 5, if valid, where 0 is north and proceeding clockwise, -1 if direction is invalid

bboxAt(hexcol, hexrow) → Object

This method returns the bounding box of the specified hex tile

Parameters:

  • hexcol [Number] — the hex column of the hex tile
  • hexrow [Number] — the hex row of the hex tile

Returns:

  • [Object] — the bounding box of the hex tile

buildHexPathDescriptor(params) → Array<Hash>

This method returns an array of hex path segment information.

Parameters:

  • params [Hash] — the hex path parameters

Returns:

  • [Array<Hash>] — an array of hashes, each containing information required to create one segment of the hex path

calcHexPathBounds(params) → Hash

This method hexcol-based bounds information to aid in hex-in-region detection logic

Parameters:

  • params [Hash] — the hex region parameters

Returns:

  • [Hash] — a hash containing bounds values by hexcol

coordAt(hexcol, hexrow) → Object

This method returns the center point of the specified hex tile

Parameters:

  • hexcol [Number] — the hex column of the hex tile
  • hexrow [Number] — the hex row of the hex tile

Returns:

  • [Object] — the center point of the hex tile with an x property and a y property

draw(callback)

This method uses a callback function to draw the hex map for each hex.

Parameters:

  • callback [Function] — the function to call initialization and hex drawing operations

formatHexPathDescriptor(desc, formatter, needs_bbox) → Hash ⇏ ArgumentError

This method converts a hex path descriptor to a different type of data set.

Parameters:

  • desc [Array<Hash>] — the hex path descriptor
  • formatter [Hash] — a hash containing keyed functions to handle conversion functions
  • needs_bbox [Boolean] — true, if the caller wants bounding box information calculated and returned <default: false>

Returns:

  • [Hash] — a hash containing the type of data returned as well as a path description in the format defined by the type

Throws:

  • [ArgumentError] — if the descriptor is invalid, or the type is invalid

getAdjacentTiles(hexcol, hexrow) → Array<Hash or Null>] the coordinates of the six adjacent hex tiles, in order of [ col,row-1

This method returns an array of hex tile coordinates of the six adjacent hex tiles.

Parameters:

  • hexcol [Number] — the hex column of the hex tile
  • hexrow [Number] — the hex row of the hex tile

Returns:

  • [Array<Hash or Null>] the coordinates of the six adjacent hex tiles, in order of [ col,row-1 ] — and progressing clockwise

getAlignment(hexcol, hexrow, hexcol2, hexrow2) → Hash or Null

This method determines if two hexes are aligned with each other along the six hexrow directions

Parameters:

  • hexcol [Number] — the hex column of the hex tile
  • hexrow [Number] — the hex row of the hex tile
  • hexcol2 [Number] — the hex column of the second hex tile
  • hexrow2 [Number] — the hex row of the second hex tile

Returns:

  • [Hash or Null] — the direction and distance of the aligned hex from the first to the second hex, or Null if not aligned

getSpineAlignment(hexcol, hexrow, hexcol2, hexrow2, extended) → Hash or Null

This method determines if two hexes are aligned with each other along the two horizontal or six hex-spine directions

Parameters:

  • hexcol [Number] — the hex column of the hex tile
  • hexrow [Number] — the hex row of the hex tile
  • hexcol2 [Number] — the hex column of the second hex tile
  • hexrow2 [Number] — the hex row of the second hex tile
  • extended [Boolean] — if true, calculates alignment along the non-horizontal hex-spine directions

Returns:

  • [Hash or Null] — the direction and distance of the aligned hex from the first to the second hex, or Null if not aligned

hcsFor(hexcol, hexrow, granularity) → Cartesia.HexCoordinateSystem

This method returns a hex coordinate system tied to a specific hex map tile.

Parameters:

  • hexcol [Number] — the hex column of the map tile
  • hexrow [Number] — the hex row of the map tile
  • granularity [Integer] — the granularity of the coordinate system

Returns:

  • [Cartesia.HexCoordinateSystem] — a CoordinateSystem tied to that specific hex map tile

hexesAway(hexcol, hexrow, to_hexcol, to_hexrow) → Number

This method returns the number of hexes away one hex tile is from another

Parameters:

  • hexcol [Number] — the hex column of the origin hex tile
  • hexrow [Number] — the hex row of the origin hex tile
  • to_hexcol [Number] — the hex column of the distant hex tile
  • to_hexrow [Number] — the hex row of the distant hex tile

Returns:

  • [Number] — the number of hexes the distant hex tile is from the origin tile

hextantsAway(hexcol, hexrow, to_hexcol, to_hexrow) → Array<String>] the hextant locations of the distant hex tile from the origin: [ 'nw','w','sw','ne','e','se'

This method returns the hextants where one hex tile is from another

Parameters:

  • hexcol [Number] — the hex column of the origin hex tile
  • hexrow [Number] — the hex row of the origin hex tile
  • to_hexcol [Number] — the hex column of the distant hex tile
  • to_hexrow [Number] — the hex row of the distant hex tile

Returns:

  • [Array<String>] the hextant locations of the distant hex tile from the origin: [ 'nw','w','sw','ne','e','se' ] —

isAdjacent(hexcol, hexrow, hexcol2, hexrow2) → Integer

This method determines if two hexes are adjacent to each other

Parameters:

  • hexcol [Number] — the hex column of the hex tile
  • hexrow [Number] — the hex row of the hex tile
  • hexcol2 [Number] — the hex column of the second hex tile
  • hexrow2 [Number] — the hex row of the second hex tile

Returns:

  • [Integer] — the direction of the adjacent from the first to the second hex, or -1 if not adjacent

makeCirclePath(params, needs_bbox) → Hash

This method returns a circular path description based on the incoming single-hex hex region parameters.

Parameters:

  • params [Hash] — the hex region parameters
  • needs_bbox [Boolean] — true, if the caller wants bounding box information calculated and returned <default: false>

Returns:

  • [Hash] — a hash containing the center coordinate of the hex and the path descriptor relative to that point.

makeHexPath(params, needs_bbox) → Hash

This method returns a hex path description based on the incoming hex region parameters.

Parameters:

  • params [Hash] — the hex region parameters
  • needs_bbox [Boolean] — true, if the caller wants bounding box information calculated and returned <default: false>

Returns:

  • [Hash] — a hash containing the center coordinate of the hex and the path descriptor relative to that point.

makeHexPathCoords(params, needs_bbox) → Hash

This method returns a hex path description based on the incoming hex region parameters.

Parameters:

  • params [Hash] — the hex region parameters
  • needs_bbox [Boolean] — true, if the caller wants bounding box information calculated and returned <default: false>

Returns:

  • [Hash] — a hash containing the center coordinate of the hex and the path descriptor relative to that point.

makePathInHex(params, needs_bbox) → Hash

This method returns a circular path description based on the incoming single-hex hex region parameters.

Parameters:

  • params [Hash] — the hex region parameters
  • needs_bbox [Boolean] — true, if the caller wants bounding box information calculated and returned <default: false>

Returns:

  • [Hash] — a hash containing the center coordinate of the hex and the path descriptor relative to that point.

mapdims() → Array<Number>

This method returns the map dimensions.

Returns:

  • [Array<Number>] — the width and height of the map returned as a 2-element array

nearestHexTo(point) → Object

This method returns the nearest hex tile to a given point

Parameters:

  • point [Variadic] — the specified point

Returns:

  • [Object] — the nearest hex tile as a JS object with row, column and dir properties

traceHexPathDescriptor(params, debug) → Array<Hash>

This method returns an array of hex path segment information.

Parameters:

  • params [Hash] — the hex path parameters
  • debug [Number] — debug level <default: 0>

Returns:

  • [Array<Hash>] — an array of hashes, each containing information required to create one segment of the hex path

visitNextTile(hexcol, hexrow, direction, unclipped) → Array<Hash> or Null

This method returns the next tile in a given direction.

Parameters:

  • hexcol [Number] — the hex column of the hex tile
  • hexrow [Number] — the hex row of the hex tile
  • direction [String or Number] — the direction to visit
  • unclipped [Boolean] — allow off-map visiting of virtual tiles, if true <default: false>

Returns:

  • [Array<Hash> or Null] — an array of hex tile coordinates, or null if a callback function was specified

visitTiles(hexcol, hexrow, n, direction, callback) → Array<Hash> or Null

This method returns an array of hex tile coordinates ranging n hexes out in a given direction and including the target tile.

Parameters:

  • hexcol [Number] — the hex column of the hex tile
  • hexrow [Number] — the hex row of the hex tile
  • n [Number] — the number of tiles to visit, limited by the map edges
  • direction [String or Number] — the direction to visit
  • callback [Function or Null] — the callback function to call for each hex tile visited

Returns:

  • [Array<Hash> or Null] — an array of hex tile coordinates, or null if a callback function was specified

Class: Cartesia.Hexagon ← Cartesia.Polygon

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
polygon.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all hexagon-based calculations.

Constructor Registry

Item
Attributes
new Cartesia.Hexagon(cpoint, size, orientation)
-

Property Registry

Item
Attributes
height
-
width
-

Constructor Details

new Cartesia.Hexagon(cpoint, size, orientation)

This constructor creates a new hexagon.

Parameters:

  • cpoint [Cartesia.Point] — the location of the center of the hexagon
  • size [Number] — the edge-to-edge size of the hexagon
  • orientation [Cartesia.WIDE or Cartesia.TALL] — the orientation of the hexagon <default: Cartesia.WIDE>

Property Details

height

width

Class: Cartesia.Line

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
line.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all line-based calculations.

Line Representations

This class supports three types of lines: segments, vectors and infinite. As the the name implies, infinite lines are infinite. Segments have two end points, while vectors are infinite in a single direction from an end point.

Constructor Registry

Item
Attributes
new Cartesia.Line(options) ⇏ ArgumentError
-

Property Registry

Item
Attributes
length
-

Method Registry

Item
Attributes
clone() ⇏ Error
-
closestIntersectionPointFromPoint(point, force_infinite) → Cartesia.Point
-
distanceFromPoint(point) → Number
-
intersectionPoint(line) → Cartesia.Line or Cartesia.Point or Null ⇏ ArgumentError
-
pointAtDX(dx) → Cartesia.Point or Null
-
pointAtDY(dy) → Cartesia.Point or Null
-
pointAtX(x) → Cartesia.Point or Null
-
pointAtY(y) → Cartesia.Point or Null
-
set(options) → Cartesia.Line ⇏ ArgumentError
-
split() → Array<Cartesia.Line> ⇏ TypeError
-
toArray() → Array<Number>
-
toString() → String
-

Constructor Details

new Cartesia.Line(options) ⇏ ArgumentError

This constructor will build a Cartesia.Line object based on input criteria.

Parameters:

  • options [Object] — the line parameters, specifying options for the three types of lines
    • from [Variadic] — the starting point in a line segment
    • to [Variadic] — the end point in a line segment
    • reference [Variadic] — the starting point in a line vector or a reference point in an infinite line
    • bearing [Variadic] — the angle defining the slope of the line vector
    • slope [Variadic] — the angle defining the slope of the line vector

Throws:

  • [ArgumentError] — if the options inputs are invalid or unrecognizable

Property Details

length

Method Details

clone() ⇏ Error

This method will build a new Cartesia.Line object identical to the current line

Throws:

  • [Error] — if the current line is invalid

closestIntersectionPointFromPoint(point, force_infinite) → Cartesia.Point

This method finds the point on a line closest to a given point.

Parameters:

  • point [Variadic] — the point to calculate the distance from
  • force_infinite [Boolean] — an option to treat the line as an infinite line, regardless of type

Returns:

  • [Cartesia.Point] — the point on the line which is closest to the specified point

distanceFromPoint(point) → Number

This method finds distance of a given point to the line at its closest point.

Parameters:

  • point [Variadic] — the point to calculate the distance from

Returns:

  • [Number] — the distance to the given point

intersectionPoint(line) → Cartesia.Line or Cartesia.Point or Null ⇏ ArgumentError

This method finds a point where two lines intersect, if they do.

Parameters:

  • line [Cartesia.Line] — the line to compare against

Returns:

  • [Cartesia.Line or Cartesia.Point or Null] — the intersection point if a point is found, null if not, or itself if the lines are identical

Throws:

  • [ArgumentError] — if the given argument is not a line

pointAtDX(dx) → Cartesia.Point or Null

This method finds the point on a line at a distance from the line's reference point in the x-direction.

Parameters:

  • dx [Number] — the distance from the line's reference point in the y-direction

Returns:

  • [Cartesia.Point or Null] — the point on the line, if able to be calculated

pointAtDY(dy) → Cartesia.Point or Null

This method finds the point on a line at a distance from the line's reference point in the y-direction.

Parameters:

  • dy [Number] — the distance from the line's reference point in the y-direction

Returns:

  • [Cartesia.Point or Null] — the point on the line, if able to be calculated

pointAtX(x) → Cartesia.Point or Null

This method finds the point on a line at a specific x-coordinate.

Parameters:

  • x [Number] — the x-coordinate

Returns:

  • [Cartesia.Point or Null] — the point on the line, if able to be calculated

pointAtY(y) → Cartesia.Point or Null

This method finds the point on a line at a specific y-coordinate.

Parameters:

  • y [Number] — the x-coordinate

Returns:

  • [Cartesia.Point or Null] — the point on the line, if able to be calculated

set(options) → Cartesia.Line ⇏ ArgumentError

This method will build a Cartesia.Line object based on input criteria.

Parameters:

  • options [Object] — the line parameters, specifying options for the three types of lines
    • from [Variadic] — the starting point in a line segment
    • to [Variadic] — the end point in a line segment
    • reference [Variadic] — the starting point in a line vector or a reference point in an infinite line
    • bearing [Variadic] — the angle defining the slope of the line vector
    • slope [Variadic] — the angle defining the slope of the line vector

Returns:

  • [Cartesia.Line] — itself

Throws:

  • [ArgumentError] — if the options inputs are invalid or unrecognizable

split() → Array<Cartesia.Line> ⇏ TypeError

This method splits an infinite line into two vectors at its reference point.

Returns:

  • [Array<Cartesia.Line>] — the two line vectors split at the infinite line's reference point

Throws:

  • [TypeError] — if the line is not an infinite line

toArray() → Array<Number>

This method converts a line to a N-element array of reference points and the line's end point, if a segment, or bearing, if not.

Returns:

  • [Array<Number>] — the array of information

toString() → String

This method converts a line to a string representation.

Returns:

  • [String] — a string representation of the line

Class: Cartesia.Point

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
point.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all point-based calculations.

Point Representations

Raw point representations used to create and/or operate on this class can come in many forms:
  • Cartesia.Point
  • a 2-element array of x,y coordinates
  • x,y coordinates as separate arguments, defaulting to 0,0

This multitude of representations leads to the use of variadic arguments for the functions.

Constructor Registry

Item
Attributes
new Cartesia.Point(point) ⇏ ArgumentError
-

Property Registry

Item
Attributes
x
-
y
-

Method Registry

Item
Attributes
bearingFrom(point) → Cartesia.Angle ⇏ ArgumentError
-
bearingTo(point) → Cartesia.Angle ⇏ ArgumentError
-
clone() → Cartesia.Point
-
distanceFrom(point) → Number ⇏ ArgumentError
-
dxyTo(point) → Array<Number> ⇏ ArgumentError
-
moveTo$(distance, bearing) → Cartesia.Point ⇏ ArgumentError
-
newPointFrom(distance, bearing) → Cartesia.Point
-
newPointRotatedFrom(angle, point) → Cartesia.Point ⇏ ArgumentError
-
newPointUsingDXY(dx, dy) → Cartesia.Point
-
rotateAround$(angle, point) → Cartesia.Point ⇏ ArgumentError
-
set(point) → Cartesia.Point ⇏ ArgumentError
-
toArray() → Array<Number>
-
toString() → String
-

Constructor Details

new Cartesia.Point(point) ⇏ ArgumentError

Parameters:

  • point [Variadic] — the initial value of the point <default: 0,0>

Throws:

  • [ArgumentError] — if the point representation is invalid or unrecognized

Property Details

x

y

Method Details

bearingFrom(point) → Cartesia.Angle ⇏ ArgumentError

This method calculates the bearing of a specified point from this point.

Parameters:

  • point [Variadic] — the point away from this point <default: 0,0>

Returns:

  • [Cartesia.Angle] — the bearing of the specified point from this point

Throws:

  • [ArgumentError] — if the point representation is invalid or unrecognized

bearingTo(point) → Cartesia.Angle ⇏ ArgumentError

This method calculates the bearing of this point from a specified point.

Parameters:

  • point [Variadic] — the point away from this point <default: 0,0>

Returns:

  • [Cartesia.Angle] — the bearing of this point from the specified point

Throws:

  • [ArgumentError] — if the point representation is invalid or unrecognized

clone() → Cartesia.Point

This function returns a new Cartesia.Point with the same values.

Returns:

  • [Cartesia.Point] — the new Cartesia.Point object

distanceFrom(point) → Number ⇏ ArgumentError

This method calculates the distance between this point and a specified point.

Parameters:

  • point [Variadic] — the point away from this point <default: 0,0>

Returns:

  • [Number] — the distance between the points

Throws:

  • [ArgumentError] — if the point representation is invalid or unrecognized

dxyTo(point) → Array<Number> ⇏ ArgumentError

This method calculates the dx,dy distances from this point to a specified point.

Parameters:

  • point [Variadic] — the point away from this point <default: 0,0>

Returns:

  • [Array<Number>] — the 2-element array of dx,dy distances between the points

Throws:

  • [ArgumentError] — if the point representation is invalid or unrecognized

moveTo$(distance, bearing) → Cartesia.Point ⇏ ArgumentError

This method move this point to a new location some distance and bearing from its current location.

Parameters:

  • distance [Number] — the distance to move this point from its current location
  • bearing [Cartesia.Angle or Number] — the directional bearing from this point to move itself

Returns:

  • [Cartesia.Point] — itself

Throws:

  • [ArgumentError] — if the point or angle representation is invalid or unrecognized

newPointFrom(distance, bearing) → Cartesia.Point

This method creates a new point some distance and bearing from this point.

Parameters:

  • distance [Number] — the distance from its current location
  • bearing [Cartesia.Angle or Number] — the directional bearing from this point

Returns:

  • [Cartesia.Point] — the new Cartesia.Point

newPointRotatedFrom(angle, point) → Cartesia.Point ⇏ ArgumentError

This method creates a new point some radial distance around another point by a specified angle.

Parameters:

  • angle [Cartesia.Angle or Number] — the angle argument as a Cartesia.Angle object or a measurement in radians
  • point [Variadic] — the point away from this point <default: 0,0>

Returns:

  • [Cartesia.Point] — ths new Cartesia.Point

Throws:

  • [ArgumentError] — if the point or angle representation is invalid or unrecognized

newPointUsingDXY(dx, dy) → Cartesia.Point

This method creates a new point some dx,dy distance from this point.

Parameters:

  • dx [Number] — the dx distance
  • dy [Number] — the dy distance

Returns:

  • [Cartesia.Point] — the new Cartesia.Point

rotateAround$(angle, point) → Cartesia.Point ⇏ ArgumentError

This method moves this point around another point by a specified angle.

Parameters:

  • angle [Cartesia.Angle or Number] — the angle argument as a Cartesia.Angle object or a measurement in radians
  • point [Variadic] — the point away from this point <default: 0,0>

Returns:

  • [Cartesia.Point] — itself

Throws:

  • [ArgumentError] — if the point or angle representation is invalid or unrecognized

set(point) → Cartesia.Point ⇏ ArgumentError

This method sets the point's value.

Parameters:

  • point [Variadic] — the value of the point to set <default: 0,0>

Returns:

  • [Cartesia.Point] — itself

Throws:

  • [ArgumentError] — if the point representation is invalid or unrecognized

toArray() → Array<Number>

This method converts this point to a coordinate array.

Returns:

  • [Array<Number>] — the coordinate array

toString() → String

This method converts the point to a string representation.

Returns:

  • [String] — the string representation of the point.

Class: Cartesia.Polygon

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
polygon.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class handles all polygon-based calculations.

Constructor Registry

Item
Attributes
new Cartesia.Polygon(points) ⇏ ArgumentError
-

Method Registry

Item
Attributes
$ptDistanceInfo(point) → Variadic ⇏ ArgumentError
<private>
appendPoint(point) → Cartesia.Polygon ⇏ ArgumentError
-
appendPoints(points) → Cartesia.Polygon ⇏ ArgumentError
-
boundingBox() → Cartesia.Polygon
-
closestIntersectionPointFromPoint(point) → Cartesia.Point
-
deletePointAt(index) → Cartesia.Polygon ⇏ ArgumentError
-
distanceFromPoint(point) → Number
-
insertPoint(point, index) → Cartesia.Polygon ⇏ ArgumentError
-
insertPoints(points, index) → Cartesia.Polygon ⇏ ArgumentError
-
isPointInside(point) → Boolean ⇏ ArgumentError
-
lineSegments() → Array<Cartesia.Line>
-
set(points) → Cartesia.Polygon ⇏ ArgumentError
-
toString() → String
-

Constructor Details

new Cartesia.Polygon(points) ⇏ ArgumentError

This constructor creates a new polygon based on the supplied points, in order of connection.

Parameters:

  • points [Array<Cartesia.Point>] — the points which make up the polygon

Throws:

  • [ArgumentError] — if the supplied points vector is invalid

Method Details

$ptDistanceInfo(point) → Variadic ⇏ ArgumentError   <private>

This private method calculates the point and distance between a given point and the polygon

Parameters:

  • point [Cartesia.Point] — the point to compare against

Returns:

  • [Variadic] — a 2-element array containing the point on the polygon which is closest and the distance between those points

Throws:

  • [ArgumentError] — if the given point is invalid

appendPoint(point) → Cartesia.Polygon ⇏ ArgumentError

This method appends a point to the polygon's point list.

Parameters:

  • point [Array<Cartesia.Point>] — the point to append to the polygon

Returns:

  • [Cartesia.Polygon] — itself

Throws:

  • [ArgumentError] — if the supplied points vector is invalid

appendPoints(points) → Cartesia.Polygon ⇏ ArgumentError

This method appends points to the polygon's point list.

Parameters:

  • points [Array<Cartesia.Point>] — the points to append to the polygon

Returns:

  • [Cartesia.Polygon] — itself

Throws:

  • [ArgumentError] — if the supplied points vector is invalid

boundingBox() → Cartesia.Polygon

This method returns the bounding box of the polygon.

Returns:

  • [Cartesia.Polygon] — the bounding box rectangle containing the polygon

closestIntersectionPointFromPoint(point) → Cartesia.Point

This method finds the point on the polygon closest to the specified point.

Parameters:

  • point [Cartesia.Point] — the reference point to determining the closest point to

Returns:

  • [Cartesia.Point] — the closest point of the polygon to the reference point

deletePointAt(index) → Cartesia.Polygon ⇏ ArgumentError

This method deletes a point from the polygon.

Parameters:

  • index [Integer] — the zero-based index of the point of the polygon to delete

Returns:

  • [Cartesia.Polygon] — itself

Throws:

  • [ArgumentError] — if the index is invalid

distanceFromPoint(point) → Number

This method finds the closest distance between a given point and any point of the polygon.

Parameters:

  • point [Cartesia.Point] — the reference point to determining the closest point to

Returns:

  • [Number] — the closest distance to the point

insertPoint(point, index) → Cartesia.Polygon ⇏ ArgumentError

This method inserts a point into the polygon list at the specified location.

Parameters:

  • point [Array<Cartesia.Point>] — the point to insert into the polygon
  • index [Integer] — the zero-based index of the point of the polygon to delete

Returns:

  • [Cartesia.Polygon] — itself

Throws:

  • [ArgumentError] — if the supplied points vector is invalid

insertPoints(points, index) → Cartesia.Polygon ⇏ ArgumentError

This method inserts points to the polygon's point list at the specified location.

Parameters:

  • points [Array<Cartesia.Point>] — the points to insert into the polygon
  • index [Integer] — the zero-based index of the point of the polygon to delete

Returns:

  • [Cartesia.Polygon] — itself

Throws:

  • [ArgumentError] — if the supplied points vector is invalid

isPointInside(point) → Boolean ⇏ ArgumentError

This method determines if a given point is inside the polygon.

Parameters:

  • point [Cartesia.Point] — the point we are checking for

Returns:

  • [Boolean] — true, if the point is inside the polygon

Throws:

  • [ArgumentError] — if the point is invalid

lineSegments() → Array<Cartesia.Line>

This method returns the array of line segments which will make up the polygon.

Returns:

  • [Array<Cartesia.Line>] — the array of line segments

set(points) → Cartesia.Polygon ⇏ ArgumentError

This constructor creates a new polygon based on the supplied points, in order of connection.

Parameters:

  • points [Array<Cartesia.Point>] — the points which make up the polygon

Returns:

  • [Cartesia.Polygon] — itself

Throws:

  • [ArgumentError] — if the supplied points vector is invalid

toString() → String

This method returns a string represention of the polygon.

Returns:

  • [String] — the string representation

This documentation page was generated by the Codoc gem on 04-Nov-2025 at 12:06:27.
Gem Documentation Page
Codoc: Code Documentation Generator (0.99.2)
Overview
Codoc (class)
Codoc::CParser (class)
Codoc::CRubyParser (class)
Codoc::DokuWikiEmitter (class)
Codoc::Emitter (class)
Codoc::FBlock (class)
Codoc::GBlock (class)
Codoc::HTMLEmitter (class)
Codoc::JSParser (class)
Codoc::LBlock (class)
Codoc::Logger (class)
Codoc::Parser (class)
Codoc::Reporter (class)
Codoc::RubyParser (class)
Codoc::Tag (class)

Overview

Codoc is a documentation generator which relies on specially-formatted comments embedded within the source code to generated documentation pages

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/emitter.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/emitters/dokuwiki.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/emitters/html.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/emitters/reporter.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/fblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/gblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/languages/c.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/languages/cruby.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/languages/js.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/languages/ruby.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/lblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/logger.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/parser.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/tag.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.

Contents Directory

Objects
C Codoc
C Codoc::CParser
C Codoc::CRubyParser
C Codoc::DokuWikiEmitter
C Codoc::Emitter
C Codoc::FBlock
C Codoc::GBlock
C Codoc::HTMLEmitter
C Codoc::JSParser
C Codoc::LBlock
C Codoc::Logger
C Codoc::Parser
C Codoc::Reporter
C Codoc::RubyParser
C Codoc::Tag
Constants & Methods
• do (Codoc)
• CMAP (Codoc::Emitter)
• CMAP (Codoc::Parser)
• EXTMAP (Codoc::Parser)
• HINT_TAGS (Codoc::Parser)

Class: Codoc

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/emitter.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/emitters/dokuwiki.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/emitters/html.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/emitters/reporter.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/fblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/gblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/languages/c.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/languages/cruby.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/languages/js.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/languages/ruby.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/lblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/logger.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.
lib/codoc/parser.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.
lib/codoc/tag.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.

Overview

Class Method Registry

Item
Attributes
do(-arglist-)
-

Class Method Details

do(-arglist-)

This method is used to parse, report and generate documentation.

Parameters:

  • -arglist- [Hash] — the processing parameters
    • type [Symbol] — the type of codoc object to process
    • item [Symbol] — the type of codoc object to process
    • options [Hash] — the type of codoc object to process
      • verbose [Boolean] — the verbosity of the operation <default: false>
    • as [Symbol] — the type of documentation to generate if the parsing is successful
    • folder [String] — the type of documentation to generate if the parsing is successful
    • basename [String] — the type of documentation to generate if the parsing is successful

Class: Codoc::CParser

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/languages/c.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::CRubyParser

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/languages/cruby.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::DokuWikiEmitter

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/emitters/dokuwiki.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::Emitter

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/emitter.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.

Overview

Class Constant Registry

Item
Attributes
CMAP
-

Class Constant Details

CMAP


Class: Codoc::FBlock

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/fblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::GBlock

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/gblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::HTMLEmitter

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/emitters/html.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::JSParser

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/languages/js.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::LBlock

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/lblock.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::Logger

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/logger.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::Parser

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/parser.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.

Overview

Class Constant Registry

Item
Attributes
CMAP
-
EXTMAP
-
HINT_TAGS
-

Class Constant Details

CMAP


EXTMAP


HINT_TAGS


Class: Codoc::Reporter

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/emitters/reporter.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::RubyParser

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/languages/ruby.rbRubyKenneth F. GuerinCopyright © 2021-2025, Kenneth F. Guerin, all rights reserved.

Overview

Class: Codoc::Tag

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/codoc/tag.rbRubyKenneth F. GuerinCopyright © 2021-2022, Kenneth F. Guerin, all rights reserved.

Overview

This documentation page was generated by the Codoc gem on 23-Nov-2025 at 20:00:08.
Gem Documentation Page
PepperMill: GUI Library (0.2.2)
Overview
PepperMill (cruby)
PepperMill::Application (class)
PepperMill::Buildable (class)
PepperMill::EventManager (class)
PepperMill::Init_pixmill (function)
PepperMill::MainWindow (class)
PepperMill::Menu (class)
PepperMill::MenuBar (class)
PepperMill::MenuItem (class)
PepperMill::Utils (class)
PepperMill::Window (class)
PepperMill::rb_peppermill_attach ( ⟼ attach)
PepperMill::rb_peppermill_cocoa_framework ( ⟼ framework)
PepperMill::rb_peppermill_current ( ⟼ current)
PepperMill::rb_peppermill_gtk_framework ( ⟼ framework)
PepperMill::NativeApplication (cruby)
PepperMill::NativeApplication::gtk_activate (function)
PepperMill::NativeApplication::rb_application_cocoa_initialize ( ⟼ initialize)
PepperMill::NativeApplication::rb_application_cocoa_launch ( ⟼ launch)
PepperMill::NativeApplication::rb_application_cocoa_terminate ( ⟼ terminate)
PepperMill::NativeApplication::rb_application_gtk_initialize ( ⟼ initialize)
PepperMill::NativeApplication::rb_application_gtk_launch ( ⟼ launch)
PepperMill::NativeApplication::rb_application_gtk_terminate ( ⟼ terminate)
PepperMill::NativeMainWindow (cruby)
PepperMill::NativeMainWindow::rb_mainwindow_cocoa_initialize ( ⟼ initialize)
PepperMill::NativeMainWindow::rb_mainwindow_cocoa_set_size ( ⟼ set_size)
PepperMill::NativeMainWindow::rb_mainwindow_cocoa_set_title ( ⟼ set_title)
PepperMill::NativeMainWindow::rb_mainwindow_cocoa_show ( ⟼ show)
PepperMill::NativeMainWindow::rb_mainwindow_gtk_close ( ⟼ close)
PepperMill::NativeMainWindow::rb_mainwindow_gtk_initialize ( ⟼ initialize)
PepperMill::NativeMainWindow::rb_mainwindow_gtk_set_size ( ⟼ set_size)
PepperMill::NativeMainWindow::rb_mainwindow_gtk_set_title ( ⟼ set_title)
PepperMill::NativeMainWindow::rb_mainwindow_gtk_show ( ⟼ show)
PepperMill::NativeMenu (cruby)
PepperMill::NativeMenu::rb_menu_cocoa_configure ( ⟼ configure)
PepperMill::NativeMenu::rb_menu_cocoa_initialize ( ⟼ initialize)
PepperMill::NativeMenu::rb_menu_gtk_configure ( ⟼ configure)
PepperMill::NativeMenu::rb_menu_gtk_initialize ( ⟼ initialize)
PepperMill::NativeMenuBar (cruby)
PepperMill::NativeMenuBar::rb_menubar_cocoa_attach ( ⟼ attach)
PepperMill::NativeMenuBar::rb_menubar_cocoa_configure ( ⟼ configure)
PepperMill::NativeMenuBar::rb_menubar_cocoa_initialize ( ⟼ initialize)
PepperMill::NativeMenuBar::rb_menubar_gtk_attach ( ⟼ attach)
PepperMill::NativeMenuBar::rb_menubar_gtk_configure ( ⟼ configure)
PepperMill::NativeMenuBar::rb_menubar_gtk_initialize ( ⟼ initialize)
PepperMill::NativeMenuItem (cruby)
PepperMill::NativeMenuItem::rb_menuitem_cocoa_configure ( ⟼ configure)
PepperMill::NativeMenuItem::rb_menuitem_cocoa_initialize ( ⟼ initialize)
PepperMill::NativeMenuItem::rb_menuitem_cocoa_set_enable_state ( ⟼ set_enable_state)
PepperMill::NativeMenuItem::rb_menuitem_gtk_configure ( ⟼ configure)
PepperMill::NativeMenuItem::rb_menuitem_gtk_initialize ( ⟼ initialize)
PepperMill::NativeMenuItem::rb_menuitem_gtk_set_enable_state ( ⟼ set_enable_state)
PepperMill::NativeWindow (cruby)
PepperMill::NativeWindow::rb_window_gtk_initialize ( ⟼ initialize)

Overview

PepperMill: Graphical User Interface Library

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/application.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/buildable.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/eventmanager.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/mainwindow.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/menu.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/menubar.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/menuitem.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/utils.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/window.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/attach.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-application-delegate.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-application.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-framework.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-interface.hCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-mainwindow-delegate.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-mainwindow.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-menu.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-menubar.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-menuitem.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/current.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/extconf.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-application.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-framework.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-mainwindow.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-menu.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-menubar.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-menuitem.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-window.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/init.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/peppermill.hCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Contents Directory

Objects
C PepperMill
C PepperMill::Application
C PepperMill::Buildable
C PepperMill::EventManager
F PepperMill::Init_pixmill
C PepperMill::MainWindow
C PepperMill::Menu
C PepperMill::MenuBar
C PepperMill::MenuItem
C PepperMill::Utils
C PepperMill::Window
F PepperMill::rb_peppermill_attach ⟼ attach
F PepperMill::rb_peppermill_cocoa_framework ⟼ framework
F PepperMill::rb_peppermill_current ⟼ current
F PepperMill::rb_peppermill_gtk_framework ⟼ framework
C PepperMill::NativeApplication
F PepperMill::NativeApplication::gtk_activate
F PepperMill::NativeApplication::rb_application_cocoa_initialize ⟼ initialize
F PepperMill::NativeApplication::rb_application_cocoa_launch ⟼ launch
F PepperMill::NativeApplication::rb_application_cocoa_terminate ⟼ terminate
F PepperMill::NativeApplication::rb_application_gtk_initialize ⟼ initialize
F PepperMill::NativeApplication::rb_application_gtk_launch ⟼ launch
F PepperMill::NativeApplication::rb_application_gtk_terminate ⟼ terminate
C PepperMill::NativeMainWindow
F PepperMill::NativeMainWindow::rb_mainwindow_cocoa_initialize ⟼ initialize
F PepperMill::NativeMainWindow::rb_mainwindow_cocoa_set_size ⟼ set_size
F PepperMill::NativeMainWindow::rb_mainwindow_cocoa_set_title ⟼ set_title
F PepperMill::NativeMainWindow::rb_mainwindow_cocoa_show ⟼ show
F PepperMill::NativeMainWindow::rb_mainwindow_gtk_close ⟼ close
F PepperMill::NativeMainWindow::rb_mainwindow_gtk_initialize ⟼ initialize
F PepperMill::NativeMainWindow::rb_mainwindow_gtk_set_size ⟼ set_size
F PepperMill::NativeMainWindow::rb_mainwindow_gtk_set_title ⟼ set_title
F PepperMill::NativeMainWindow::rb_mainwindow_gtk_show ⟼ show
C PepperMill::NativeMenu
F PepperMill::NativeMenu::rb_menu_cocoa_configure ⟼ configure
F PepperMill::NativeMenu::rb_menu_cocoa_initialize ⟼ initialize
F PepperMill::NativeMenu::rb_menu_gtk_configure ⟼ configure
F PepperMill::NativeMenu::rb_menu_gtk_initialize ⟼ initialize
C PepperMill::NativeMenuBar
F PepperMill::NativeMenuBar::rb_menubar_cocoa_attach ⟼ attach
F PepperMill::NativeMenuBar::rb_menubar_cocoa_configure ⟼ configure
F PepperMill::NativeMenuBar::rb_menubar_cocoa_initialize ⟼ initialize
F PepperMill::NativeMenuBar::rb_menubar_gtk_attach ⟼ attach
F PepperMill::NativeMenuBar::rb_menubar_gtk_configure ⟼ configure
F PepperMill::NativeMenuBar::rb_menubar_gtk_initialize ⟼ initialize
C PepperMill::NativeMenuItem
F PepperMill::NativeMenuItem::rb_menuitem_cocoa_configure ⟼ configure
F PepperMill::NativeMenuItem::rb_menuitem_cocoa_initialize ⟼ initialize
F PepperMill::NativeMenuItem::rb_menuitem_cocoa_set_enable_state ⟼ set_enable_state
F PepperMill::NativeMenuItem::rb_menuitem_gtk_configure ⟼ configure
F PepperMill::NativeMenuItem::rb_menuitem_gtk_initialize ⟼ initialize
F PepperMill::NativeMenuItem::rb_menuitem_gtk_set_enable_state ⟼ set_enable_state
C PepperMill::NativeWindow
F PepperMill::NativeWindow::rb_window_gtk_initialize ⟼ initialize
Constants & Methods
• onmenu (PepperMill::Application)
• build (PepperMill::Buildable)
• close (PepperMill::MainWindow)
• onclose (PepperMill::MainWindow)
• onpropertychange (PepperMill::MainWindow)
• onresize (PepperMill::MainWindow)
• set_height (PepperMill::MainWindow)
• set_size (PepperMill::MainWindow)
• set_title (PepperMill::MainWindow)
• set_width (PepperMill::MainWindow)
• show (PepperMill::MainWindow)
• [] (PepperMill::Menu)
• find (PepperMill::Menu)
• onpropertychange (PepperMill::Menu)
• sections (PepperMill::Menu)
• to_s (PepperMill::Menu)
• [] (PepperMill::MenuBar)
• attach (PepperMill::MenuBar)
• find (PepperMill::MenuBar)
• items (PepperMill::MenuBar)
• length (PepperMill::MenuBar)
• onpropertychange (PepperMill::MenuBar)
• accelerator (PepperMill::MenuItem)
• disable (PepperMill::MenuItem)
• disabled? (PepperMill::MenuItem)
• enable (PepperMill::MenuItem)
• is_action? (PepperMill::MenuItem)
• is_submenu? (PepperMill::MenuItem)
• label (PepperMill::MenuItem)
• onpropertychange (PepperMill::MenuItem)
• signal (PepperMill::MenuItem)
• submenu (PepperMill::MenuItem)
• to_s (PepperMill::MenuItem)
• type (PepperMill::MenuItem)
• parse_dimension_style (PepperMill::Utils)

Cruby: PepperMill

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/application.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/buildable.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/eventmanager.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/mainwindow.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/menu.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/menubar.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/menuitem.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/utils.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
lib/peppermill/window.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/attach.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/cocoa-framework.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/current.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-framework.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/init.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

Class: PepperMill::Application

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/application.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class manages the application.

Constructor Registry

Item
Attributes
new(id, xmlfile, p)
-

Method Registry

Item
Attributes
onmenu(block)
-

Constructor Details

new(id, xmlfile, p)

The Application initializer

Parameters:

  • id [String] — the application identifier
  • xmlfile [String] — an optional filename containing application resources in XML format <default: nil>
  • p [Proc] — an optional filename containing application resources in XML format <default: nil>

Method Details

onmenu(block)

Sets/unsets the onmenu notification.

Parameters:

  • block [Block] — a block of code that is passed to the EventManager if a proc is not supplied <default: nil>

Class: PepperMill::Buildable

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/buildable.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class manages the PepperMill buildable interface.

Constructor Registry

Item
Attributes
new(app)
-

Method Registry

Item
Attributes
build(key)
-

Constructor Details

new(app)

The Buildable initializer

Parameters:

  • app [PepperMill::Application] — the owning application

Method Details

build(key)

This method requests properties from the application and applies them.

Parameters:

  • key [String] — the key to search for

Class: PepperMill::EventManager

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/eventmanager.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class manages the application.

Constructor Registry

Item
Attributes
new(id, xmlfile, p)
-

Constructor Details

new(id, xmlfile, p)

The Application initializer

Parameters:

  • id [String] — the application identifier
  • xmlfile [String] — an optional filename containing application resources in XML format <default: nil>
  • p [Proc] — an optional filename containing application resources in XML format <default: nil>

Function: PepperMill::Init_pixmill

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/init.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function creates the PepperMill Ruby module and initializes / requires various subclasses within it.

The following methods and subclasses are created and/or loaded into the PepperMill module space: - PepperMill::framework (method) - PepperMill::Application (subclass) - PepperMill::MainWindow (subclass)

Class: PepperMill::MainWindow

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/mainwindow.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class manages the PepperMill application main window.

Constructor Registry

Item
Attributes
new(app, content)
-

Method Registry

Item
Attributes
close
-
onclose(block)
-
onpropertychange(command, args)
-
onresize(block)
-
set_height(height)
-
set_size(width, height)
-
set_title(title)
-
set_width(width)
-
show
-

Constructor Details

new(app, content)

The MainWindow initializer

Parameters:

  • app [PepperMill::Application] — the owning application
  • content [Hash] — the content options of the item <default: nil>

Method Details

close

This method closes the window

onclose(block)

Sets/unsets the onclose notification.

Parameters:

  • block [Block] — a block of code that is passed to the EventManager if a proc is not supplied <default: nil>

onpropertychange(command, args)

This method handles main window content changes, passing them to the underlying native layer.

Parameters:

  • command [Symbol] — the content change parameters <default: :assign>
  • args [Array<Any>] — optional parameters used to satisfy the command

onresize(block)

Sets/unsets the onresize notification.

Parameters:

  • block [Block] — a block of code that is passed to the EventManager if a proc is not supplied <default: nil>

set_height(height)

This method sets the main window height

Parameters:

  • height [String or Numeric] — the new height

set_size(width, height)

This method sets the main window size

Parameters:

  • width [String or Numeric] — the new width
  • height [String or Numeric] — the new height

set_title(title)

This method sets the main window title

Parameters:

  • title [String] — the title

set_width(width)

This method sets the main window width

Parameters:

  • width [String or Numeric] — the new width

show

This method shows the window

Class: PepperMill::Menu

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/menu.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class manages the PepperMill menus.

Constructor Registry

Item
Attributes
new(app, content)
-

Method Registry

Item
Attributes
[](index)
-
find(signal, deep) → PepperMill::MenuItem or Nil
-
onpropertychange(command, args)
-
sections
-
to_s
-

Constructor Details

new(app, content)

The Menu initializer

Parameters:

  • app [PepperMill::Application] — the owning application
  • content [Hash] — the content options of the item <default: nil>

Method Details

[](index)

This method returns the Nth section in the menu.

Parameters:

  • index [Integer] — the index

find(signal, deep) → PepperMill::MenuItem or Nil

This method finds action menu item in its list of menu items or, optionally, submenus.

Parameters:

  • signal [Symbol] — the signal of the menu item to find
  • deep [Boolean] — if true, searches submenu as well <default: true>

Returns:

  • [PepperMill::MenuItem or Nil] — the found menu item or nil if not found

onpropertychange(command, args)

This method handles main window content changes, passing them to the underlying native layer.

Parameters:

  • command [Symbol] — the content change parameters <default: :assign>
  • args [Array<Any>] — optional parameters used to satisfy the command

sections

This method returns the list of sections in the menu.

to_s

This method emits a string representation of the object.

Class: PepperMill::MenuBar

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/menubar.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class manages the PepperMill application menu bar.

Constructor Registry

Item
Attributes
new(app, content)
-

Method Registry

Item
Attributes
[](index)
-
attach
-
find(signal) → PepperMill::MenuItem or Nil
-
items
-
length
-
onpropertychange(command, args)
-

Constructor Details

new(app, content)

The MenuBar initializer

Parameters:

  • app [PepperMill::Application] — the owning application
  • content [Hash] — the content options of the item <default: nil>

Method Details

[](index)

This method returns the Nth item in the menu.

Parameters:

  • index [Integer] — the index

attach

This method attaches the window to the main window.

find(signal) → PepperMill::MenuItem or Nil

This method finds an action menu item in its list of menu items or submenus thereof.

Parameters:

  • signal [Symbol] — the signal of the menu item to find

Returns:

  • [PepperMill::MenuItem or Nil] — the found menu item or nil if not found

items

This method returns the list of items in the menu.

length

This method returns the list of items in the menu.

onpropertychange(command, args)

This method handles main window content changes, passing them to the underlying native layer.

Parameters:

  • command [Symbol] — the content change parameters <default: :assign>
  • args [Array<Any>] — optional parameters used to satisfy the command

Class: PepperMill::MenuItem

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/menuitem.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class manages the PepperMill menu items.

Constructor Registry

Item
Attributes
new(app, content)
-

Method Registry

Item
Attributes
accelerator → Hash
-
disable
-
disabled? → Boolean
-
enable
-
is_action? → Boolean
-
is_submenu? → Boolean
-
label → String
-
onpropertychange(command, args)
-
signal → Symbol
-
submenu → PepperMill::Menu
-
to_s
-
type → Symbol
-

Constructor Details

new(app, content)

The MenuItem initializer

Parameters:

  • app [PepperMill::Application] — the owning application
  • content [Hash] — the content options of the item <default: nil>

Method Details

accelerator → Hash

This method is a property getter for accelerator

Returns:

  • [Hash] — the menu item accelerator info

disable

This method disables the menu item.

disabled? → Boolean

This method is a state requestor for the disabled state of the menu item

Returns:

  • [Boolean] — true if the menu item type is disabled

enable

This method enables the menu item.

is_action? → Boolean

This method is a state requestor for the type of the menu item

Returns:

  • [Boolean] — true if the menu item type is :action

is_submenu? → Boolean

This method is a state requestor for the type of the menu item

Returns:

  • [Boolean] — true if the menu item type is :submenu

label → String

This method is a property getter for label

Returns:

  • [String] — the menu item label

onpropertychange(command, args)

This method handles main window content changes, passing them to the underlying native layer.

Parameters:

  • command [Symbol] — the content change parameters <default: :assign>
  • args [Array<Any>] — optional parameters used to satisfy the command

signal → Symbol

This method is a property getter for signal

Returns:

  • [Symbol] — the menu item signal

submenu → PepperMill::Menu

This method is a property getter for submenu

Returns:

  • [PepperMill::Menu] — the menu item submenu

to_s

This method emits a string representation of the object.

type → Symbol

This method is a property getter for type

Returns:

  • [Symbol] — the menu item type

Class: PepperMill::Utils

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/utils.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class contains utility singleton methods.

Class Method Registry

Item
Attributes
parse_dimension_style(dim) → Hash
-

Class Method Details

parse_dimension_style(dim) → Hash

Parameters:

  • dim [String or Number] — the dimension style string or number

Returns:

  • [Hash] — dimension properties

Class: PepperMill::Window

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/peppermill/window.rbRubyKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This class manages PepperMill windows.

Constructor Registry

Item
Attributes
new(app, id, style)
-

Constructor Details

new(app, id, style)

The Application initializer

Parameters:

  • app [PepperMill::Application] — the owning application
  • id [String] — the window identifier
  • style [Hash] — the window style properties

Function: PepperMill::rb_peppermill_attach ⟼ attach

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/attach.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function attaches an application object to the class.

Function: PepperMill::rb_peppermill_cocoa_framework ⟼ framework

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-framework.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function returns a symbol describing the underlying PepperMill framework.

Function: PepperMill::rb_peppermill_current ⟼ current

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/current.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function returns the current application object.

Function: PepperMill::rb_peppermill_gtk_framework ⟼ framework

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-framework.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function returns a symbol describing the underlying PepperMill framework.

Cruby: PepperMill::NativeApplication

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-application.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-application.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

Function: PepperMill::NativeApplication::gtk_activate

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-application.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function is called post-run by GTK to handle initialization activities.

Function: PepperMill::NativeApplication::rb_application_cocoa_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-application.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeApplication constructor.

Function: PepperMill::NativeApplication::rb_application_cocoa_launch ⟼ launch

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-application.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeApplication launch method.

Function: PepperMill::NativeApplication::rb_application_cocoa_terminate ⟼ terminate

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-application.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeApplication terminate method.

Function: PepperMill::NativeApplication::rb_application_gtk_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-application.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeApplication constructor.

Function: PepperMill::NativeApplication::rb_application_gtk_launch ⟼ launch

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-application.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeApplication launch method.

Function: PepperMill::NativeApplication::rb_application_gtk_terminate ⟼ terminate

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-application.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeApplication terminate method.

Cruby: PepperMill::NativeMainWindow

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-mainwindow.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-mainwindow.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

Function: PepperMill::NativeMainWindow::rb_mainwindow_cocoa_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-mainwindow.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow constructor.

Function: PepperMill::NativeMainWindow::rb_mainwindow_cocoa_set_size ⟼ set_size

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-mainwindow.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow show method.

Function: PepperMill::NativeMainWindow::rb_mainwindow_cocoa_set_title ⟼ set_title

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-mainwindow.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow show method.

Function: PepperMill::NativeMainWindow::rb_mainwindow_cocoa_show ⟼ show

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-mainwindow.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow show method.

Function: PepperMill::NativeMainWindow::rb_mainwindow_gtk_close ⟼ close

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-mainwindow.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow close method.

Function: PepperMill::NativeMainWindow::rb_mainwindow_gtk_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-mainwindow.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow constructor.

Function: PepperMill::NativeMainWindow::rb_mainwindow_gtk_set_size ⟼ set_size

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-mainwindow.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow show method.

Function: PepperMill::NativeMainWindow::rb_mainwindow_gtk_set_title ⟼ set_title

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-mainwindow.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow show method.

Function: PepperMill::NativeMainWindow::rb_mainwindow_gtk_show ⟼ show

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-mainwindow.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMainWindow show method.

Cruby: PepperMill::NativeMenu

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menu.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-menu.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

Function: PepperMill::NativeMenu::rb_menu_cocoa_configure ⟼ configure

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menu.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenu configurator.

Function: PepperMill::NativeMenu::rb_menu_cocoa_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menu.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenu constructor.

Function: PepperMill::NativeMenu::rb_menu_gtk_configure ⟼ configure

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-menu.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenu configurator.

Function: PepperMill::NativeMenu::rb_menu_gtk_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-menu.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenu constructor.

Cruby: PepperMill::NativeMenuBar

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menubar.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-menubar.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

Function: PepperMill::NativeMenuBar::rb_menubar_cocoa_attach ⟼ attach

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menubar.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function attaches a menu bar to the main window.

Function: PepperMill::NativeMenuBar::rb_menubar_cocoa_configure ⟼ configure

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menubar.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuBar configurator.

Function: PepperMill::NativeMenuBar::rb_menubar_cocoa_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menubar.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuBar constructor.

Function: PepperMill::NativeMenuBar::rb_menubar_gtk_attach ⟼ attach

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-menubar.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuBar attach method.

Function: PepperMill::NativeMenuBar::rb_menubar_gtk_configure ⟼ configure

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-menubar.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuBar configurator.

Function: PepperMill::NativeMenuBar::rb_menubar_gtk_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-menubar.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuBar constructor.

Cruby: PepperMill::NativeMenuItem

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menuitem.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.
ext/peppermill/gtk-menuitem.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

Function: PepperMill::NativeMenuItem::rb_menuitem_cocoa_configure ⟼ configure

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menuitem.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuItem constructor.

Function: PepperMill::NativeMenuItem::rb_menuitem_cocoa_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menuitem.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuItem constructor.

Function: PepperMill::NativeMenuItem::rb_menuitem_cocoa_set_enable_state ⟼ set_enable_state

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/cocoa-menuitem.mCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuItem enable/disable state.

Function: PepperMill::NativeMenuItem::rb_menuitem_gtk_configure ⟼ configure

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-menuitem.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuItem configurator.

Function: PepperMill::NativeMenuItem::rb_menuitem_gtk_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-menuitem.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuItem constructor.

Function: PepperMill::NativeMenuItem::rb_menuitem_gtk_set_enable_state ⟼ set_enable_state

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-menuitem.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeMenuItem enable/disable state.

Cruby: PepperMill::NativeWindow

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-window.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

Function: PepperMill::NativeWindow::rb_window_gtk_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/peppermill/gtk-window.cCKenneth F. GuerinCopyright © 2025, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PepperMill::NativeWindow constructor.

This documentation page was generated by the Codoc gem on 23-Nov-2025 at 19:59:53.
Gem Documentation Page
PixMill: Graphics Library (1.3.5)
Overview
PixMill (module)
PixMill::BoundingBox (class)
PixMill::CallbackRegion ( ← PixMill::Rectangle)
PixMill::Circle ( ← PixMill::MarkingObject)
PixMill::ColorTable (class)
PixMill::ColorTools (module)
PixMill::CompositeDrawingContext (class)
PixMill::CompositePangoInfo (class)
PixMill::DataTable ( ← PixMill::Rectangle)
PixMill::Ellipse ( ← PixMill::MarkingObject)
PixMill::GraphicsState (class)
PixMill::Hexagon ( ← PixMill::MarkingObject)
PixMill::Image ( ← PixMill::MarkingObject)
PixMill::MarkingObject (class)
PixMill::PangoText ( ← PixMill::MarkingObject)
PixMill::Path ( ← PixMill::MarkingObject)
PixMill::PathDescriptor (class)
PixMill::PathEngine (class)
PixMill::Polygon ( ← PixMill::MarkingObject)
PixMill::Rectangle ( ← PixMill::MarkingObject)
PixMill::Shader (class)
PixMill::Text ( ← PixMill::PangoText)
PixMill::TextAttributeList (class)
PixMill::TextPath ( ← PixMill::PangoText)
PixMill::Viewport ( ← PixMill::MarkingObject)
PixMill (cruby)
PixMill::Init_pixmill (function)
PixMill::Canvas (cruby)
PixMill::Canvas::rb_canvas_flip ( ⟼ flip)
PixMill::Canvas::rb_canvas_initialize ( ⟼ initialize)
PixMill::Canvas::rb_canvas_rootbox ( ⟼ rootbox)
PixMill::Canvas::rb_canvas_save ( ⟼ save)
PixMill::DrawingContext (cruby)
PixMill::FontAttributeList (cruby)
PixMill::FontDescription (cruby)
PixMill::FontLayout (cruby)
PixMill::FontLayoutIter (cruby)
PixMill::NativeColor (cruby)
PixMill::Pattern (cruby)
PixMill::Surface (cruby)
Stencil (module)

Overview

PixMill: Graphics Generator & Text Layout Library

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/boundingbox.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/colortable.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/colortools.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/composites.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/graphicsstate.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/ncsctab.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/pathdescriptor.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/pathengine.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/resenectab.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/shader.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/stencil/fleur-de-lis.rbRubyKenneth F. GuerinCopyright © 2022, Kenneth F. Guerin, all rights reserved.
lib/pixmill/stencil/gear.rbRubyKenneth F. GuerinCopyright © 2022, Kenneth F. Guerin, all rights reserved.
lib/pixmill/stencil/star.rbRubyKenneth F. GuerinCopyright © 2022, Kenneth F. Guerin, all rights reserved.
lib/pixmill/textattributelist.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/w3cctab.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/cairo-context.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/cairo-pattern.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/cairo-surface.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/canvas.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/extconf.hC
ext/pixmill/extconf.rbRuby
ext/pixmill/init.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/ncolor.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/pango-attrlist.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/pango-fontdesc.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/pango-iter.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/pango-layout.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.
ext/pixmill/pixmill.hC
ext/pixmill/utils.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Contents Directory

Objects
M PixMill
C PixMill::BoundingBox
C PixMill::CallbackRegion ← PixMill::Rectangle
C PixMill::Circle ← PixMill::MarkingObject
C PixMill::ColorTable
M PixMill::ColorTools
C PixMill::CompositeDrawingContext
C PixMill::CompositePangoInfo
C PixMill::DataTable ← PixMill::Rectangle
C PixMill::Ellipse ← PixMill::MarkingObject
C PixMill::GraphicsState
C PixMill::Hexagon ← PixMill::MarkingObject
C PixMill::Image ← PixMill::MarkingObject
C PixMill::MarkingObject
C PixMill::PangoText ← PixMill::MarkingObject
C PixMill::Path ← PixMill::MarkingObject
C PixMill::PathDescriptor
C PixMill::PathEngine
C PixMill::Polygon ← PixMill::MarkingObject
C PixMill::Rectangle ← PixMill::MarkingObject
C PixMill::Shader
C PixMill::Text ← PixMill::PangoText
C PixMill::TextAttributeList
C PixMill::TextPath ← PixMill::PangoText
C PixMill::Viewport ← PixMill::MarkingObject
C PixMill
F PixMill::Init_pixmill
C PixMill::Canvas
F PixMill::Canvas::rb_canvas_flip ⟼ flip
F PixMill::Canvas::rb_canvas_initialize ⟼ initialize
F PixMill::Canvas::rb_canvas_rootbox ⟼ rootbox
F PixMill::Canvas::rb_canvas_save ⟼ save
C PixMill::DrawingContext
C PixMill::FontAttributeList
C PixMill::FontDescription
C PixMill::FontLayout
C PixMill::FontLayoutIter
C PixMill::NativeColor
C PixMill::Pattern
C PixMill::Surface
M Stencil
Constants & Methods
• NCS_CTAB (PixMill)
• RESENE_CTAB (PixMill)
• W3C_CTAB (PixMill)
• new_from_box (PixMill::BoundingBox)
• new_from_cxyr (PixMill::BoundingBox)
• new_from_cxywh (PixMill::BoundingBox)
• new_from_cxyxryr (PixMill::BoundingBox)
• new_from_ptr (PixMill::BoundingBox)
• new_from_xywh (PixMill::BoundingBox)
• bottomleft (PixMill::BoundingBox)
• bottomright (PixMill::BoundingBox)
• center (PixMill::BoundingBox)
• move! (PixMill::BoundingBox)
• move_to! (PixMill::BoundingBox)
• moved (PixMill::BoundingBox)
• position (PixMill::BoundingBox)
• resize! (PixMill::BoundingBox)
• resize_to! (PixMill::BoundingBox)
• resized (PixMill::BoundingBox)
• set_from (PixMill::BoundingBox)
• set_from_box (PixMill::BoundingBox)
• set_from_cxyr (PixMill::BoundingBox)
• set_from_cxyxryr (PixMill::BoundingBox)
• set_from_pts (PixMill::BoundingBox)
• set_from_xywh (PixMill::BoundingBox)
• size (PixMill::BoundingBox)
• to_ary (PixMill::BoundingBox)
• to_s (PixMill::BoundingBox)
• topright (PixMill::BoundingBox)
• xywh (PixMill::BoundingBox)
• cliptrace (PixMill::CallbackRegion)
• draw (PixMill::CallbackRegion)
• set (PixMill::CallbackRegion)
• trace (PixMill::CallbackRegion)
• place (PixMill::Circle)
• set (PixMill::Circle)
• trace (PixMill::Circle)
• xywhrr (PixMill::Circle) <private>
• [] (PixMill::ColorTable)
• delete (PixMill::ColorTable)
• get (PixMill::ColorTable)
• get_alpha (PixMill::ColorTable)
• get_closest_cspec_key (PixMill::ColorTable)
• get_key_spec (PixMill::ColorTable)
• keys (PixMill::ColorTable)
• load (PixMill::ColorTable)
• load_alpha (PixMill::ColorTable)
• set (PixMill::ColorTable)
• set_alpha (PixMill::ColorTable)
• color_to_gray_rgb_cspec (PixMill::ColorTools)
• convert_cmyk_cspec (PixMill::ColorTools)
• convert_cmyka_cspec (PixMill::ColorTools)
• convert_cmyka_cspec_to_cmyk_cspec (PixMill::ColorTools)
• convert_rgb_cspec (PixMill::ColorTools)
• convert_rgba_cspec (PixMill::ColorTools)
• convert_rgba_cspec_to_rgb_cspec (PixMill::ColorTools)
• extract_alpha_from_rgba_cspec (PixMill::ColorTools)
• is_gray_rgb_cspec? (PixMill::ColorTools)
• is_valid_cmyk_cspec? (PixMill::ColorTools)
• is_valid_cmyka_cspec? (PixMill::ColorTools)
• is_valid_rgb_spec? (PixMill::ColorTools)
• is_valid_rgba_cspec? (PixMill::ColorTools)
• random_gray_rgb_cspec (PixMill::ColorTools)
• random_rgb_cspec (PixMill::ColorTools)
• typeof_cmyk_cspec (PixMill::ColorTools)
• typeof_cmyka_cspec (PixMill::ColorTools)
• typeof_rgb_cspec (PixMill::ColorTools)
• typeof_rgba_cspec (PixMill::ColorTools)
• [] (PixMill::CompositeDrawingContext)
• create_font_layout (PixMill::CompositeDrawingContext)
• current_point (PixMill::CompositeDrawingContext)
• font_layout_path (PixMill::CompositeDrawingContext)
• method_missing (PixMill::CompositeDrawingContext)
• path_extents (PixMill::CompositeDrawingContext)
• show_font_layout (PixMill::CompositeDrawingContext)
• update_font_layout (PixMill::CompositeDrawingContext)
• [] (PixMill::CompositePangoInfo)
• extents (PixMill::CompositePangoInfo)
• method_missing (PixMill::CompositePangoInfo)
• cliptrace (PixMill::DataTable)
• draw (PixMill::DataTable)
• set (PixMill::DataTable)
• trace (PixMill::DataTable)
• place (PixMill::Ellipse)
• set (PixMill::Ellipse)
• trace (PixMill::Ellipse)
• register (PixMill::GraphicsState)
• DEFAULT_CTAB (PixMill::GraphicsState)
• GRAVITIES (PixMill::GraphicsState)
• LAYOUTS (PixMill::GraphicsState)
• [] (PixMill::GraphicsState)
• clipto (PixMill::GraphicsState)
• config_pattern_spec (PixMill::GraphicsState) <private>
• config_source (PixMill::GraphicsState) <private>
• gen_canvas_bbox (PixMill::GraphicsState) <private>
• get_native_color (PixMill::GraphicsState)
• is_east? (PixMill::GraphicsState)
• is_north? (PixMill::GraphicsState)
• is_south? (PixMill::GraphicsState)
• is_west? (PixMill::GraphicsState)
• paint (PixMill::GraphicsState)
• pop (PixMill::GraphicsState)
• pop! (PixMill::GraphicsState)
• push (PixMill::GraphicsState)
• resetclip (PixMill::GraphicsState)
• restore_path (PixMill::GraphicsState)
• save_path (PixMill::GraphicsState)
• set (PixMill::GraphicsState)
• set_line_props (PixMill::GraphicsState) <private>
• set_pattern_gravity_matrix (PixMill::GraphicsState) <private>
• stroke_fill (PixMill::GraphicsState)
• unclip (PixMill::GraphicsState)
• ctab (PixMill::GraphicsState)
• dc (PixMill::GraphicsState)
• place (PixMill::Hexagon)
• set (PixMill::Hexagon)
• trace (PixMill::Hexagon)
• bbox (PixMill::Image)
• cliptrace (PixMill::Image)
• draw (PixMill::Image)
• place (PixMill::Image)
• set (PixMill::Image)
• trace (PixMill::Image)
• bbox (PixMill::MarkingObject)
• calc_dim (PixMill::MarkingObject) <private>
• clipto (PixMill::MarkingObject)
• cliptrace (PixMill::MarkingObject)
• draw (PixMill::MarkingObject)
• parent_is_base? (PixMill::MarkingObject) <private>
• parent_is_viewport? (PixMill::MarkingObject)
• place (PixMill::MarkingObject)
• reparent (PixMill::MarkingObject)
• set (PixMill::MarkingObject)
• set_hexagon_layout (PixMill::MarkingObject) <private>
• set_image_layout (PixMill::MarkingObject) <private>
• set_poly_layout (PixMill::MarkingObject) <private>
• set_radii_layout (PixMill::MarkingObject) <private>
• set_text_layout (PixMill::MarkingObject) <private>
• set_wh_layout (PixMill::MarkingObject) <private>
• trace (PixMill::MarkingObject)
• unclip (PixMill::MarkingObject)
• update (PixMill::MarkingObject)
• viewport (PixMill::MarkingObject)
• dc (PixMill::MarkingObject)
• layout (PixMill::MarkingObject)
• parent (PixMill::MarkingObject)
• props (PixMill::MarkingObject)
• scale (PixMill::MarkingObject)
• type (PixMill::MarkingObject)
• bbox (PixMill::PangoText)
• cliptrace (PixMill::PangoText)
• gen_font_layout (PixMill::PangoText) <private>
• load_font_attributes (PixMill::PangoText) <private>
• place (PixMill::PangoText)
• set (PixMill::PangoText)
• trace (PixMill::PangoText)
• place (PixMill::Path)
• set (PixMill::Path)
• trace (PixMill::Path)
• trace_the_path (PixMill::Path) <private>
• crpath_to_desc (PixMill::PathDescriptor)
• h (PixMill::PathDescriptor)
• join (PixMill::PathDescriptor) <private>
• l (PixMill::PathDescriptor)
• m (PixMill::PathDescriptor) <private>
• r (PixMill::PathDescriptor)
• rbody (PixMill::PathDescriptor) <private>
• rr (PixMill::PathDescriptor)
• rrbody (PixMill::PathDescriptor) <private>
• v (PixMill::PathDescriptor)
• any_tokens? (PixMill::PathDescriptor)
• compile (PixMill::PathDescriptor) <private>
• meshtrace (PixMill::PathDescriptor)
• set (PixMill::PathDescriptor)
• trace (PixMill::PathDescriptor)
• desc (PixMill::PathDescriptor)
• tokens (PixMill::PathDescriptor)
• circle (PixMill::PathEngine) <private>
• clipto (PixMill::PathEngine)
• dispatch (PixMill::PathEngine) <private>
• dx (PixMill::PathEngine)
• dxy (PixMill::PathEngine)
• dy (PixMill::PathEngine)
• earc_check (PixMill::PathEngine) <private>
• ellipse (PixMill::PathEngine) <private>
• ellipse_check (PixMill::PathEngine) <private>
• flush (PixMill::PathEngine)
• method_missing (PixMill::PathEngine) <private>
• pop (PixMill::PathEngine)
• push (PixMill::PathEngine)
• qpath (PixMill::PathEngine)
• run (PixMill::PathEngine)
• setff (PixMill::PathEngine)
• setgs (PixMill::PathEngine)
• gs (PixMill::PathEngine)
• place (PixMill::Polygon)
• set (PixMill::Polygon)
• trace (PixMill::Polygon)
• xyvec (PixMill::Polygon) <private>
• place (PixMill::Rectangle)
• set (PixMill::Rectangle)
• trace (PixMill::Rectangle)
• xywhrr (PixMill::Rectangle) <private>
• process_dict (PixMill::Shader) <private>
• cliptrace (PixMill::Text)
• draw (PixMill::Text)
• set (PixMill::Text)
• trace (PixMill::Text)
• add_background (PixMill::TextAttributeList)
• add_fill (PixMill::TextAttributeList)
• add_font_style (PixMill::TextAttributeList)
• add_font_variant (PixMill::TextAttributeList)
• add_rise (PixMill::TextAttributeList)
• add_stretch (PixMill::TextAttributeList)
• add_strikethrough (PixMill::TextAttributeList)
• add_strikethrough_color (PixMill::TextAttributeList)
• add_stroke (PixMill::TextAttributeList)
• add_stroke_width (PixMill::TextAttributeList)
• add_subscript (PixMill::TextAttributeList)
• add_superscript (PixMill::TextAttributeList)
• add_underline (PixMill::TextAttributeList)
• add_underline_color (PixMill::TextAttributeList)
• add_weight (PixMill::TextAttributeList)
• any_drawing_attributes? (PixMill::TextAttributeList)
• any_layout_attributes? (PixMill::TextAttributeList)
• collect_drawing_attributes (PixMill::TextAttributeList)
• each_layout_attribute (PixMill::TextAttributeList)
• lenadd_font_rel_sizegth (PixMill::TextAttributeList)
• length (PixMill::TextAttributeList)
• length (PixMill::TextAttributeList)
• cliptrace (PixMill::TextPath)
• draw (PixMill::TextPath)
• set (PixMill::TextPath)
• trace (PixMill::TextPath)
• bbox (PixMill::Viewport)
• set (PixMill::Viewport)
• build (Stencil)

Module: PixMill

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/boundingbox.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/colortable.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/colortools.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/composites.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/graphicsstate.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/ncsctab.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/pathdescriptor.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/pathengine.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/resenectab.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/shader.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/textattributelist.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.
lib/pixmill/w3cctab.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

Constant Registry

Item
Attributes
NCS_CTAB
<read-only>
RESENE_CTAB
<read-only>
W3C_CTAB
<read-only>

Constant Details

NCS_CTAB   <read-only>

This color table defines NCS color names and specifications

RESENE_CTAB   <read-only>

This color table defines Resene color names and specifications

W3C_CTAB   <read-only>

This color table defines W3C color names and specifications

Class: PixMill::BoundingBox

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/boundingbox.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

The BoundingBox class is used for graphics object layouts. In essence, it's a simple rectangle with some shortcut variables, such as x2,y2 and cx,cy

Constructor Registry

Item
Attributes
new(x, y, w, h, x2, y2, cx, cy, xr, yr)
-

Class Method Registry

Item
Attributes
new_from_box(x, y, x2, y2) → BoundingBox
-
new_from_cxyr(cx, cy, r) → BoundingBox
-
new_from_cxywh(cx, cy, w, h) → BoundingBox
-
new_from_cxyxryr(cx, cy, xr, yr) → BoundingBox
-
new_from_ptr(pts) → BoundingBox
-
new_from_xywh(x, y, w, h) → BoundingBox
-

Method Registry

Item
Attributes
bottomleft → Array<Numeric>
-
bottomright → Array<Numeric>
-
center → Array<Numeric>
-
move!(dx, dy) → BoundingBox
-
move_to!(x, y) → BoundingBox
-
moved(dx, dy) → BoundingBox
-
position → Array<Numeric>
-
resize!(dw, dh) → BoundingBox
-
resize_to!(w, h) → BoundingBox
-
resized(dw, dh) → BoundingBox
-
set_from(cx, cy, w, h) → BoundingBox
-
set_from_box(x, y, x2, y2) → BoundingBox
-
set_from_cxyr(cx, cy, r) → BoundingBox
-
set_from_cxyxryr(cx, cy, xr, yr) → BoundingBox
-
set_from_pts(pts) → BoundingBox
-
set_from_xywh(x, y, w, h) → BoundingBox
-
size → Array<Numeric>
-
to_ary → Array<Numeric>
-
to_s → String
-
topright → Array<Numeric>
-
xywh → Array<Numeric>
-

Constructor Details

new(x, y, w, h, x2, y2, cx, cy, xr, yr)

Parameters:

  • x [Numeric] — the left coordinate of the bounding box
  • y [Numeric] — the top coordinate of the bounding box
  • w [Numeric] — the width of the bounding box
  • h [Numeric] — the height of the bounding box
  • x2 [Numeric] — the right coordinate of the bounding box
  • y2 [Numeric] — the bottom coordinate of the bounding box
  • cx [Numeric] — the horizontal center coordinate of the bounding box
  • cy [Numeric] — the vertical center coordinate of the bounding box
  • xr [Numeric] — the horizontal radius of the bounding box
  • yr [Numeric] — the vertical radius of the bounding box

Class Method Details

new_from_box(x, y, x2, y2) → BoundingBox

Parameters:

  • x [Numeric] — the left coordinate of the bounding box
  • y [Numeric] — the top coordinate of the bounding box
  • x2 [Numeric] — the right coordinate of the bounding box
  • y2 [Numeric] — the bottom coordinate of the bounding box

Returns:

  • [BoundingBox] — a newly created bounding box

new_from_cxyr(cx, cy, r) → BoundingBox

Parameters:

  • cx [Numeric] — the horizontal center coordinate of the bounding box
  • cy [Numeric] — the vertical center coordinate of the bounding box
  • r [Numeric] — the circular radius

Returns:

  • [BoundingBox] — a newly created bounding box

new_from_cxywh(cx, cy, w, h) → BoundingBox

Parameters:

  • cx [Numeric] — the horizontal center coordinate of the bounding box
  • cy [Numeric] — the vertical center coordinate of the bounding box
  • w [Numeric] — the width of the bounding box
  • h [Numeric] — the height of the bounding box

Returns:

  • [BoundingBox] — a newly created bounding box

new_from_cxyxryr(cx, cy, xr, yr) → BoundingBox

Parameters:

  • cx [Numeric] — the horizontal center coordinate of the bounding box
  • cy [Numeric] — the vertical center coordinate of the bounding box
  • xr [Numeric] — the horizontal elliptical radius
  • yr [Numeric] — the vertical elliptical radius

Returns:

  • [BoundingBox] — a newly created bounding box

new_from_ptr(pts) → BoundingBox

Parameters:

  • pts [Array<Numeric>] — the points of the polygon

Returns:

  • [BoundingBox] — a newly created bounding box

new_from_xywh(x, y, w, h) → BoundingBox

Parameters:

  • x [Numeric] — the left coordinate of the bounding box
  • y [Numeric] — the top coordinate of the bounding box
  • w [Numeric] — the width of the bounding box
  • h [Numeric] — the height of the bounding box

Returns:

  • [BoundingBox] — a newly created bounding box

Method Details

bottomleft → Array<Numeric>

Returns:

  • [Array<Numeric>] — the x and y2 values as a single array

bottomright → Array<Numeric>

Returns:

  • [Array<Numeric>] — the x2 and y2 values as a single array

center → Array<Numeric>

Returns:

  • [Array<Numeric>] — the cx and cy values as a single array

move!(dx, dy) → BoundingBox

Parameters:

  • dx [Numeric] — the distance to move in the x direction
  • dy [Numeric] — the distance to move in the y direction

Returns:

  • [BoundingBox] — the current bounding box

move_to!(x, y) → BoundingBox

Parameters:

  • x [Numeric] — the new location along the x axis
  • y [Numeric] — the new location along the y axis

Returns:

  • [BoundingBox] — the current bounding box

moved(dx, dy) → BoundingBox

Parameters:

  • dx [Numeric] — the distance to move in the x direction
  • dy [Numeric] — the distance to move in the y direction

Returns:

  • [BoundingBox] — the new bounding box

position → Array<Numeric>

Returns:

  • [Array<Numeric>] — the x and y values as a single array

resize!(dw, dh) → BoundingBox

Parameters:

  • dw [Numeric] — the width difference to resize
  • dh [Numeric] — the height difference to resize

Returns:

  • [BoundingBox] — the current bounding box

resize_to!(w, h) → BoundingBox

Parameters:

  • w [Numeric] — the new width
  • h [Numeric] — the new height

Returns:

  • [BoundingBox] — the current bounding box

resized(dw, dh) → BoundingBox

Parameters:

  • dw [Numeric] — the width difference to resize
  • dh [Numeric] — the height difference to resize

Returns:

  • [BoundingBox] — the new bounding box

set_from(cx, cy, w, h) → BoundingBox

Parameters:

  • cx [Numeric] — the horizontal center coordinate of the bounding box
  • cy [Numeric] — the vertical center coordinate of the bounding box
  • w [Numeric] — the width of the bounding box
  • h [Numeric] — the height of the bounding box

Returns:

  • [BoundingBox] — the current bounding box

set_from_box(x, y, x2, y2) → BoundingBox

Parameters:

  • x [Numeric] — the left coordinate of the bounding box
  • y [Numeric] — the top coordinate of the bounding box
  • x2 [Numeric] — the right coordinate of the bounding box
  • y2 [Numeric] — the bottom coordinate of the bounding box

Returns:

  • [BoundingBox] — the current bounding box

set_from_cxyr(cx, cy, r) → BoundingBox

Parameters:

  • cx [Numeric] — the horizontal center coordinate of the bounding box
  • cy [Numeric] — the vertical center coordinate of the bounding box
  • r [Numeric] — the circular radius

Returns:

  • [BoundingBox] — the current bounding box

set_from_cxyxryr(cx, cy, xr, yr) → BoundingBox

Parameters:

  • cx [Numeric] — the horizontal center coordinate of the bounding box
  • cy [Numeric] — the vertical center coordinate of the bounding box
  • xr [Numeric] — the horizontal elliptical radius
  • yr [Numeric] — the vertical elliptical radius

Returns:

  • [BoundingBox] — the current bounding box

set_from_pts(pts) → BoundingBox

Parameters:

  • pts [Array<Numeric>] — the points of the polygon

Returns:

  • [BoundingBox] — the current bounding box

set_from_xywh(x, y, w, h) → BoundingBox

Parameters:

  • x [Numeric] — the left coordinate of the bounding box
  • y [Numeric] — the top coordinate of the bounding box
  • w [Numeric] — the width of the bounding box
  • h [Numeric] — the height of the bounding box

Returns:

  • [BoundingBox] — the current bounding box

size → Array<Numeric>

Returns:

  • [Array<Numeric>] — the w and h values as a single array

to_ary → Array<Numeric>

Returns:

  • [Array<Numeric>] — an 8-element array of bounding box data

to_s → String

Returns:

  • [String] — a string representation of the bounding box

topright → Array<Numeric>

Returns:

  • [Array<Numeric>] — the x2 and y values as a single array

xywh → Array<Numeric>

Returns:

  • [Array<Numeric>] — the x, y, w and h values as a single array

Class: PixMill::CallbackRegion ← PixMill::Rectangle

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A CallbackRegion is simply a Rectangle with an assigned callback to handle the draw method.

Constructor Registry

Item
Attributes
new(parent, w, h, cb, args, scale, gs)
-

Method Registry

Item
Attributes
cliptrace(gs, force_placement) → CallbackRegion
-
draw(gs) → CallbackRegion
-
set(parent, w, h, cb, args, scale, gs) → CallbackRegion
-
trace
-

Constructor Details

new(parent, w, h, cb, args, scale, gs)

The CallbackRegion Constructor

Parameters:

  • parent [MarkingObject] — the parent of the callback rectangle
  • w [Numeric] — the width of the rectangle
  • h [Numeric] — the height of the rectangle
  • cb [Lambda] — the code to call to draw withing the callback rectangle
  • args [Array<Mixed>] — the arguments to pass to the callback code (optional)
  • scale [Integer] — the user unit scale of the rectangle (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

cliptrace(gs, force_placement) → CallbackRegion

Trace the callback rectangle's area onto the object heirarchy foundation for clipping purposes

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [CallbackRegion] — the current callback region object

draw(gs) → CallbackRegion

Draw the callback region content into the layout area

Parameters:

  • gs [GraphicsState] — the graphics state to use to color the object

Returns:

  • [CallbackRegion] — the current callback region object

set(parent, w, h, cb, args, scale, gs) → CallbackRegion

Set the callback's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the callback rectangle
  • w [Numeric] — the width of the rectangle
  • h [Numeric] — the height of the rectangle
  • cb [Lambda] — the code to call to draw withing the callback rectangle
  • args [Array<Mixed>] — the arguments to pass to the callback code (optional)
  • scale [Integer] — the user unit scale of the rectangle (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [CallbackRegion] — the current callback region object

trace

Override the MarkingObject.trace method

Class: PixMill::Circle ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A Circle is a round object defined and bounded by its radius.

Constructor Registry

Item
Attributes
new(parent, r, scale, gs)
-

Method Registry

Item
Attributes
place(gs) → Circle
-
set(parent, r, scale, gs) → Circle
-
trace(gs, force_placement) → Circle
-
xywhrr → Array<Numeric>
<private>

Constructor Details

new(parent, r, scale, gs)

The Circle Constructor

Parameters:

  • parent [MarkingObject] — the parent of the circle
  • r [Numeric] — the radius of the circle
  • scale [Integer] — the user unit scale of the circle (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

place(gs) → Circle

Place the circle using the radii layout

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object

Returns:

  • [Circle] — the current circle

set(parent, r, scale, gs) → Circle

Set the circle's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the circle
  • r [Numeric] — the radius of the circle
  • scale [Integer] — the user unit scale of the circle (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [Circle] — the current circle

trace(gs, force_placement) → Circle

Trace the circle's path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [Circle] — the current circle

xywhrr → Array<Numeric>   <private>

Calculate the circle's parameters when tracing it

Returns:

  • [Array<Numeric>] — the x, y and radius parameters to use when tracing the circle

Class: PixMill::ColorTable

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/colortable.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.

Overview

The color table is a series of color specifications organized by keys, which are Ruby symbols only RGB or RGBA specifications are supported at this time

Constructor Registry

Item
Attributes
new(ctab)
-

Method Registry

Item
Attributes
[](key) → String or Array<Integer> or Array<Numeric>
-
delete(key) → ColorTable
-
get(key, type) → String or Array<Integer> or Array<Numeric>
-
get_alpha(key) → Integer
-
get_closest_cspec_key(target) → Symbol
-
get_key_spec(key) → Array<Numeric>
-
keys → Array<Symbol>
-
load(ctab, must_be_unique) → ColorTable
-
load_alpha(atab) → ColorTable
-
set(key, cspec, must_be_unique) → ColorTable
-
set_alpha(key, alpha) → ColorTable
-

Constructor Details

new(ctab)

Parameters:

  • ctab [Hash] — a hash of symbolic keys and color specification values <default: nil>

Method Details

[](key) → String or Array<Integer> or Array<Numeric>

Parameters:

  • key [Symbol] — the color specification to retrieve

Returns:

  • [String or Array<Integer> or Array<Numeric>] — the retrieved color specification

delete(key) → ColorTable

Parameters:

  • key [Symbol] — the color specification to delete

Returns:

  • [ColorTable] — the current color table instance

get(key, type) → String or Array<Integer> or Array<Numeric>

Parameters:

  • key [Symbol] — the color specification to retrieve
  • type [Symbol] — the type of color specification to retrieve, or nil if the stored representation is sufficient <default: nil>

Returns:

  • [String or Array<Integer> or Array<Numeric>] — the retrieved color specification

get_alpha(key) → Integer

Parameters:

  • key [Hash] — a lookup key

Returns:

  • [Integer] — the alpha value of the color table entry

get_closest_cspec_key(target) → Symbol

Parameters:

  • target [String or Array<Integer> or Array<Numeric>] — the target color specification to match

Returns:

  • [Symbol] — the key of the color specification in the color table which is closest to the given color

get_key_spec(key) → Array<Numeric>

Parameters:

  • key [Symbol] — the color specification to retrieve

Returns:

  • [Array<Numeric>] — the Cairo-specific color specification

keys → Array<Symbol>

Returns:

  • [Array<Symbol>] — an array of color table keys

load(ctab, must_be_unique) → ColorTable

Parameters:

  • ctab [Hash] — a hash of symbolic keys and color specification values
  • must_be_unique [Boolean] — true if duplicate key overwrites are not allowed <default: false>

Returns:

  • [ColorTable] — the current color table instance

load_alpha(atab) → ColorTable

Parameters:

  • atab [Hash] — a hash of symbolic keys and alpha integer values

Returns:

  • [ColorTable] — the current color table instance

set(key, cspec, must_be_unique) → ColorTable

Parameters:

  • key [Hash] — a lookup key
  • cspec [String or Array<Integer> or Array<Numeric>] — a color specification
  • must_be_unique [Boolean] — true if duplicate key overwrites are not allowed <default: false>

Returns:

  • [ColorTable] — the current color table instance

set_alpha(key, alpha) → ColorTable

Parameters:

  • key [Hash] — a lookup key
  • alpha [Integer] — the alpha value

Returns:

  • [ColorTable] — the current color table instance

Module: PixMill::ColorTools

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/colortools.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.

Overview

The ColorTools Module This module exists to translate among different color representations: - hashstrings - atstrings (similar to hashstrings, but contains alpha / transparency data at the end) - arrays containing floating point values between 0.0 and 1.0 - arrays containing integer values between 0 and 255 The caller needs to keep track of the color space of the colors as well as the existance of alpha data in the cspec. Both RGBA and CMYK color specifications are 4 element specifications. This is why we have use atstrings for alpha-aware specifications and hashstrings for opaque specifications.

Method Registry

Item
Attributes
color_to_gray_rgb_cspec(cspec) → String or Array<Integer> or Array<Float>
-
convert_cmyk_cspec(type, cspec) → String or Array<Integer> or Array<Float>
-
convert_cmyka_cspec(type, cspec) → String or Array<Integer> or Array<Float>
-
convert_cmyka_cspec_to_cmyk_cspec(type, cspec) → String or Array<Integer> or Array<Float>
-
convert_rgb_cspec(type, cspec) → String or Array<Integer> or Array<Float>
-
convert_rgba_cspec(type, cspec) → String or Array<Integer> or Array<Float>
-
convert_rgba_cspec_to_rgb_cspec(cspec) → String or Array<Integer> or Array<Float>
-
extract_alpha_from_rgba_cspec(cspec) → Integer
-
is_gray_rgb_cspec?(cspec) → Boolean
-
is_valid_cmyk_cspec?(cspec) → Boolean
-
is_valid_cmyka_cspec?(cspec) → Boolean
-
is_valid_rgb_spec?(cspec) → Boolean
-
is_valid_rgba_cspec?(cspec) → Boolean
-
random_gray_rgb_cspec(rng, base, range, type) → String or Array<Integer> or Array<Float>
-
random_rgb_cspec(rng, base, range, type) → String or Array<Integer> or Array<Float>
-
typeof_cmyk_cspec(cspec) → Symbol
-
typeof_cmyka_cspec(cspec) → Symbol
-
typeof_rgb_cspec(cspec) → Symbol
-
typeof_rgba_cspec(cspec) → Symbol
-

Method Details

color_to_gray_rgb_cspec(cspec) → String or Array<Integer> or Array<Float>

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to convert

Returns:

  • [String or Array<Integer> or Array<Float>] — the color specification of the converted gray color

convert_cmyk_cspec(type, cspec) → String or Array<Integer> or Array<Float>

Parameters:

  • type [Symbol] — the type of specification requested { :hashstring, :integers, :floats }
  • cspec [String or Array<Integer> or Array<Float>] — the color specification to convert

Returns:

  • [String or Array<Integer> or Array<Float>] — the new color specification

convert_cmyka_cspec(type, cspec) → String or Array<Integer> or Array<Float>

Parameters:

  • type [Symbol] — the type of specification requested { :hashstring, :integers, :floats }
  • cspec [String or Array<Integer> or Array<Float>] — the color specification to convert

Returns:

  • [String or Array<Integer> or Array<Float>] — the new color specification

convert_cmyka_cspec_to_cmyk_cspec(type, cspec) → String or Array<Integer> or Array<Float>

Parameters:

  • type [Symbol] — the type of specification requested { :hashstring, :integers, :floats }
  • cspec [String or Array<Integer> or Array<Float>] — the CMYKA color specification to convert

Returns:

  • [String or Array<Integer> or Array<Float>] — the new CMYK color specification

convert_rgb_cspec(type, cspec) → String or Array<Integer> or Array<Float>

Parameters:

  • type [Symbol] — the type of specification requested { :hashstring, :integers, :floats }
  • cspec [String or Array<Integer> or Array<Float>] — the color specification to convert

Returns:

  • [String or Array<Integer> or Array<Float>] — the new color specification

convert_rgba_cspec(type, cspec) → String or Array<Integer> or Array<Float>

Parameters:

  • type [Symbol] — the type of specification requested { :hashstring, :integers, :floats }
  • cspec [String or Array<Integer> or Array<Float>] — the color specification to convert

Returns:

  • [String or Array<Integer> or Array<Float>] — the new color specification

convert_rgba_cspec_to_rgb_cspec(cspec) → String or Array<Integer> or Array<Float>

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the RGBA color specification to convert

Returns:

  • [String or Array<Integer> or Array<Float>] — the new RGB color specification

extract_alpha_from_rgba_cspec(cspec) → Integer

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the RGBA color specification to convert

Returns:

  • [Integer] — the alpha value as an integer

is_gray_rgb_cspec?(cspec) → Boolean

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Boolean] — true if the color is gray

is_valid_cmyk_cspec?(cspec) → Boolean

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Boolean] — true if the color specification is valid

is_valid_cmyka_cspec?(cspec) → Boolean

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Boolean] — true if the color specification is valid

is_valid_rgb_spec?(cspec) → Boolean

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Boolean] — true if the color specification is valid

is_valid_rgba_cspec?(cspec) → Boolean

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Boolean] — true if the color specification is valid

random_gray_rgb_cspec(rng, base, range, type) → String or Array<Integer> or Array<Float>

Parameters:

  • rng [Object] — a random number generator
  • base [Integer] — the base value to randomize from
  • range [Integer] — the maximum value in a randomized range starting at 0
  • type [Symbol] — the type of color specification to return

Returns:

  • [String or Array<Integer> or Array<Float>] — an integer array color specification of a gray color

random_rgb_cspec(rng, base, range, type) → String or Array<Integer> or Array<Float>

Parameters:

  • rng [Object] — a random number generator
  • base [Integer] — the base value to randomize from
  • range [Integer] — the maximum value in a randomized range starting at 0
  • type [Symbol] — the type of color specification to return

Returns:

  • [String or Array<Integer> or Array<Float>] — an integer array color specification of the random color

typeof_cmyk_cspec(cspec) → Symbol

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Symbol] — the type of color specification { :hashstring, :integers, :floats }

typeof_cmyka_cspec(cspec) → Symbol

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Symbol] — the type of color specification { :hashstring, :integers, :floats }

typeof_rgb_cspec(cspec) → Symbol

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Symbol] — the type of color specification { :hashstring, :integers, :floats }

typeof_rgba_cspec(cspec) → Symbol

Parameters:

  • cspec [String or Array<Integer> or Array<Float>] — the color specification to check

Returns:

  • [Symbol] — the type of color specification { :hashstring, :integers, :floats }

Class: PixMill::CompositeDrawingContext

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/composites.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

Constructor Registry

Item
Attributes
new(dc_vector)
-

Method Registry

Item
Attributes
[](nth) → DrawingContext
-
create_font_layout → CompositePangoInfo
-
current_point
-
font_layout_path
-
method_missing
<api>
path_extents → Hash
-
show_font_layout
-
update_font_layout
-

Constructor Details

new(dc_vector)

Parameters:

  • dc_vector [Array<DrawingContext>] — the array of (Cairo) DrawingContexts to manage in a composite canvas

Method Details

[](nth) → DrawingContext

Parameters:

  • nth [Integer] — the index of the pango layout vector

Returns:

  • [DrawingContext] — the specific DrawingContext requested from the collection

create_font_layout → CompositePangoInfo

This method creates a composite font layout to cover the composite DrawingContext collection.

Returns:

  • [CompositePangoInfo] — a composite font layout to cover the DrawingContext collection

current_point

This method implements the current_point API to cover all of the DrawingContexts in the collection.

font_layout_path

This method implements the font_layout_path API call to all of the DrawingContexts in the collection.

method_missing   <api>

This special Ruby method dispatches method calls to all of the DrawingContexts in the collection as if it was sent to a single specific one.

path_extents → Hash

This method returns information related to the composite DrawingContext area.

Returns:

  • [Hash] — extent information for the region covered by the DrawingContext set

show_font_layout

This method implements the show_font_layout API call to all of the DrawingContexts in the collection.

update_font_layout

This method implements the update_font_layout API call to all of the DrawingContexts in the collection.

Class: PixMill::CompositePangoInfo

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/composites.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

Constructor Registry

Item
Attributes
new(layout_vector)
-

Method Registry

Item
Attributes
[](nth) → Pango::Layout
-
extents → Hash
-
method_missing
<api>

Constructor Details

new(layout_vector)

Parameters:

  • layout_vector [Array<Pango::Layout>] — the array of Pango layout contexts to manage in a composite canvas

Method Details

[](nth) → Pango::Layout

Parameters:

  • nth [Integer] — the index of the pango layout vector

Returns:

  • [Pango::Layout] — a specific Pango layout context within the array

extents → Hash

This method returns information related to the composite Pango layout area.

Returns:

  • [Hash] — extent information for the region covered by the Pango layout context set

method_missing   <api>

This special Ruby method dispatches method calls to all of the Pango layouts in the collection as if it was sent to a single specific one.

Class: PixMill::DataTable ← PixMill::Rectangle

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A DataTable is simply a Rectangle with assigned callbacks to handle the table layout and cell content. Content gets rendered during the draw method.

Constructor Registry

Item
Attributes
new(parent, w, h, layout, content, scale, gs)
-

Method Registry

Item
Attributes
cliptrace(gs, force_placement) → CallbackRegion
-
draw(gs) → CallbackRegion
-
set(parent, w, h, layout, content, scale, gs) → CallbackRegion
-
trace
-

Constructor Details

new(parent, w, h, layout, content, scale, gs)

The CallbackRegion Constructor

Parameters:

  • parent [MarkingObject] — the parent of the callback rectangle
  • w [Numeric] — the width of the rectangle
  • h [Numeric] — the height of the rectangle
  • layout [Hash] — the information needed to handle the table layout
  • content [Hash] — the information needed to handle the data content
  • scale [Integer] — the user unit scale of the rectangle (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

cliptrace(gs, force_placement) → CallbackRegion

Trace the callback rectangle's area onto the object heirarchy foundation for clipping purposes

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [CallbackRegion] — the current callback region object

draw(gs) → CallbackRegion

Draw the callback region content into the layout area

Parameters:

  • gs [GraphicsState] — the graphics state to use to color the object

Returns:

  • [CallbackRegion] — the current callback region object

set(parent, w, h, layout, content, scale, gs) → CallbackRegion

Set the callback's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the callback rectangle
  • w [Numeric] — the width of the rectangle
  • h [Numeric] — the height of the rectangle
  • layout [Hash] — the information needed to handle the table layout
  • content [Hash] — the information needed to handle the data content
  • scale [Integer] — the user unit scale of the rectangle (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [CallbackRegion] — the current callback region object

trace

Override the MarkingObject.trace method

Class: PixMill::Ellipse ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

An Ellipse is a curved object defined and bounded by its radii.

Constructor Registry

Item
Attributes
new(parent, xr, yr, scale, gs)
-

Method Registry

Item
Attributes
place(gs) → Ellipse
-
set(parent, xr, yr, scale, gs) → Ellipse
-
trace(gs, force_placement) → Ellipse
-

Constructor Details

new(parent, xr, yr, scale, gs)

The Ellipse Constructor

Parameters:

  • parent [MarkingObject] — the parent of the ellipse
  • xr [Numeric] — the x-axis radius of the ellipse
  • yr [Numeric] — the y-axis radius of the ellipse
  • scale [Integer] — the user unit scale of the ellipse (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

place(gs) → Ellipse

Place the ellipse using the radii layout

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object

Returns:

  • [Ellipse] — the current ellipse

set(parent, xr, yr, scale, gs) → Ellipse

Set the ellipse's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the ellipse
  • xr [Numeric] — the x-axis radius of the ellipse
  • yr [Numeric] — the y-axis radius of the ellipse
  • scale [Integer] — the user unit scale of the ellipse (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [Ellipse] — the current ellipse

trace(gs, force_placement) → Ellipse

Trace the ellipse's path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [Ellipse] — the current ellipse

Class: PixMill::GraphicsState

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/graphicsstate.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.

Overview

This class is the interface layer and graphics state manager for PixMill and handles all interactions between PixMill and the underlying Cairo and Pango libraries.

Constructor Registry

Item
Attributes
new(dc, width, height, ctab)
-

Class Method Registry

Item
Attributes
register
-

Constant Registry

Item
Attributes
DEFAULT_CTAB
<read-only>
GRAVITIES
<read-only>
LAYOUTS
<read-only>

Method Registry

Item
Attributes
[](index) → Value
-
clipto(preserve) → GraphicsState
-
config_pattern_spec(pinfo) → Array
<private>
config_source(index, value)
<private>
gen_canvas_bbox(w, h, ctm) → Array<Number>
<private>
get_native_color(value) → NativeColor
-
is_east? → Boolean
-
is_north? → Boolean
-
is_south? → Boolean
-
is_west? → Boolean
-
paint → GraphicsState
-
pop(n) → GraphicsState
-
pop! → GraphicsState
-
push → GraphicsState
-
resetclip → GraphicsState
-
restore_path
-
save_path
-
set(props) → GraphicsState
-
set_line_props(dc, width)
<private>
set_pattern_gravity_matrix(dc, pattern, gravity)
<private>
stroke_fill(preserve) → GraphicsState
-
unclip → GraphicsState
-

Attribute Registry

Item
Attributes
ctab
-
dc
-

Constructor Details

new(dc, width, height, ctab)

Parameters:

  • dc [DrawingContext] — the (Cairo) drawing context to assign to the canvas
  • width [Integer] — the width of the canvas
  • height [Integer] — the height of the canvas
  • ctab [ColorTable] — the color table to use with the canvas, nil = default

Class Method Details

register

The purpose of this is/was to minimize the number of GS instances floating around

Constant Details

DEFAULT_CTAB   <read-only>


GRAVITIES   <read-only>


LAYOUTS   <read-only>


Method Details

[](index) → Value

The property access method

Parameters:

  • index [Symbol] — the property to access

Returns:

  • [Value] — the value of the property

clipto(preserve) → GraphicsState

Creates a clip region based on the current context's path and pushes it onto the context's stack

Parameters:

  • preserve [Boolean] — maintains the current path after the operation

Returns:

  • [GraphicsState] — the current graphics state instance

config_pattern_spec(pinfo) → Array   <private>

This private method is used to set the mapping matrix for a given pattern.

Parameters:

  • pinfo [Hash] — the pattern and its associated metadata

Returns:

  • [Array] — a 2-element array containing the pattern object and its auto_anchor value

config_source(index, value)   <private>

This private method is used to set the fill properties of the specified source. It does this by setting some DrawingContext interface variables, xxtype and xxsource, where 'xx' is the first 2 characters of the specified index. The legal indices are: :fill, :stroke, :source, :text, :background and :mask.

Parameters:

  • index [Symbol] — the name of the graphics state property to set
  • value [Value] — the value of the graphics state property to set

gen_canvas_bbox(w, h, ctm) → Array<Number>   <private>

This private method calculates the current bounding box of the canvas given its current width, height and ctm.

Parameters:

  • w [Number] — the current width of the canvas
  • h [Number] — the current height of the canvas
  • ctm [] — the current transformation matrix applied to the canvas

Returns:

  • [Array<Number>] — the bounding box of the canvas

get_native_color(value) → NativeColor

This method returns the NativeColor representation of the specified color value. Supplied values can be cspec strings or numeric arrays or symbols into the current color table. This method is a good way to funnel all the different color specification formats into a known format.

Parameters:

  • value [Symbol,String,Array] — the specified color value

Returns:

  • [NativeColor] — the NativeColor representation of the specified color value

is_east? → Boolean

Is the current gravity setting to the east

Returns:

  • [Boolean] — true if the current gravity setting is NE, E or SE

is_north? → Boolean

Is the current gravity setting to the north

Returns:

  • [Boolean] — true if the current gravity setting is NW, N or NE

is_south? → Boolean

Is the current gravity setting to the south

Returns:

  • [Boolean] — true if the current gravity setting is SW, S or SE

is_west? → Boolean

Is the current gravity setting to the west

Returns:

  • [Boolean] — true if the current gravity setting is NW, W or SW

paint → GraphicsState

Paints the current context using the fill source (path-independent)

Returns:

  • [GraphicsState] — the current graphics state

pop(n) → GraphicsState

Pops a previous copy of the GS into the GS from the Stack

Parameters:

  • n [Integer] — pops N copies

Returns:

  • [GraphicsState] — the current graphics state

pop! → GraphicsState

Pops all copies of the GS into the GS from the Stack

Returns:

  • [GraphicsState] — the current graphics state

push → GraphicsState

Pushes a copy of the GS onto the Stack for later retrieval via pop

Returns:

  • [GraphicsState] — the current graphics state

resetclip → GraphicsState

Pops all clip regions from the context's stack

Returns:

  • [GraphicsState] — the current graphics state instance

restore_path


save_path


set(props) → GraphicsState

The property assignment method. Order can be important here, such as setting :origin and :rotation

Parameters:

  • props [Hash] — the properties to set

Returns:

  • [GraphicsState] — the current graphics state

set_line_props(dc, width)   <private>

This private method sets the line properties of the underlying drawing context.

Parameters:

  • dc [DrawingContext] — the underlying drawing context
  • width [Number] — the line width

set_pattern_gravity_matrix(dc, pattern, gravity)   <private>

This private method sets the pattern's matrix based on a gravity well within the dimensions of the drawing context.

Parameters:

  • dc [DrawingContext] — the underlying drawing context
  • pattern [Pattern] — the pattern to use
  • gravity [Symbol] — the gravity value

stroke_fill(preserve) → GraphicsState

Fills and strokes the current context path using the fill & stroke sources

Parameters:

  • preserve [Boolean] — maintains the current path after the operation

Returns:

  • [GraphicsState] — the current graphics state

unclip → GraphicsState

Pops the current clip region from the context's stack

Returns:

  • [GraphicsState] — the current graphics state instance

Attribute Details

ctab


dc


Class: PixMill::Hexagon ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A hexagon is a six-sided polygon object defined and bounded by its orientation and edge-to-edge size.

Constructor Registry

Item
Attributes
new(parent, size, orientation, scale, gs)
-

Method Registry

Item
Attributes
place(gs) → Hexagon
-
set(parent, size, orientation, scale, gs) → Hexagon
-
trace(gs, force_placement) → Hexagon
-

Constructor Details

new(parent, size, orientation, scale, gs)

The Hexagon Constructor

Parameters:

  • parent [MarkingObject] — the parent of the hexagon
  • size [Numeric] — the edge-to-edge size of the hexagon
  • orientation [Symbol] — the orientation of the hexagon: { :wide, :tall }
  • scale [Integer] — the user unit scale of the hexagon (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

place(gs) → Hexagon

Place the hexagon using the hexagon layout

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object

Returns:

  • [Hexagon] — the current hexagon

set(parent, size, orientation, scale, gs) → Hexagon

Set the hexagon's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the hexagon
  • size [Numeric] — the edge-to-edge size of the hexagon
  • orientation [Symbol] — the orientation of the hexagon: { :wide, :tall }
  • scale [Integer] — the user unit scale of the hexagon (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [Hexagon] — the current hexagon

trace(gs, force_placement) → Hexagon

Trace the hexagon's path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [Hexagon] — the current hexagon

Class: PixMill::Image ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

The PixMill::Image class

Constructor Registry

Item
Attributes
new(parent, surface, scale, gs)
-

Method Registry

Item
Attributes
bbox → BoundingBox or Nil
-
cliptrace(gs, force_placement) → Image
-
draw(gs) → Image
-
place(gs) → Image
-
set(parent, surface, scale, gs) → Image
-
trace
-

Constructor Details

new(parent, surface, scale, gs)

The Image Constructor

Parameters:

  • parent [MarkingObject] — the parent of the path
  • surface [Surface] — the image to draw/render
  • scale [Integer] — the user unit scale of the text layout position (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

bbox → BoundingBox or Nil

The bbox method, which is used to return the bounding box of the object within the object heirarchy

Returns:

  • [BoundingBox or Nil] — the bounding box of the object

cliptrace(gs, force_placement) → Image

Trace the image object's area onto the object heirarchy foundation for clipping purposes

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [Image] — the current image object

draw(gs) → Image

Draw the image into the layout area

Parameters:

  • gs [GraphicsState] — the graphics state to use to color the object

Returns:

  • [Image] — the current image object

place(gs) → Image

Place the object using Pango infromation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object

Returns:

  • [Image] — the current image object

set(parent, surface, scale, gs) → Image

Set the path's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the path
  • surface [Surface] — the image to draw/render
  • scale [Integer] — the user unit scale of the text layout position (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [Image] — the current image object

trace

Override the MarkingObject.trace method

Class: PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A note about the default trinity of place, trace and draw methods. The order of ops is: - place the object onto the canvas (sets layout) - trace the object's path (relies on the layout; vector objects only; can call place if need be) - draw the object using its path (relies on the object's path trace; can call place or trace if need be) - errors are handled via thrown exceptions, whether soft or hard - the draw method can supply an exception handler to catch soft errors

Method Registry

Item
Attributes
bbox → BoundingBox or Nil
-
calc_dim(scale, value)
<private>
clipto(gs) → MarkingObject
-
cliptrace(gs, force_placement) → MarkingObject
-
draw(gs) → MarkingObject
-
parent_is_base? → Boolean
<private>
parent_is_viewport? → Boolean
-
place(gs) → MarkingObject
-
reparent(parent, gs) → MarkingObject
-
set(type, parent, scale, props) → MarkingObject
-
set_hexagon_layout(gs, ee, orientation) → MarkingObject
<private>
set_image_layout(gs, surface) → MarkingObject
<private>
set_poly_layout(gs, minmax) → MarkingObject
<private>
set_radii_layout(gs, xr, yr) → MarkingObject
<private>
set_text_layout(gs, font_layout, snap_to_ink) → MarkingObject
<private>
set_wh_layout(gs, w, h) → MarkingObject
<private>
trace(gs, force_placement) → MarkingObject
-
unclip(gs) → MarkingObject
-
update(props) → MarkingObject
-
viewport → Viewport
-

Attribute Registry

Item
Attributes
dc
-
layout
-
parent
-
props
-
scale
-
type
-

Method Details

bbox → BoundingBox or Nil

The bbox method, which is used to return the bounding box of the object within the object heirarchy

Returns:

  • [BoundingBox or Nil] — the bounding box of the object

calc_dim(scale, value)   <private>

Parameters:

  • scale [Number] — the scale factor to use
  • value [Number] — the source value to calculate from

clipto(gs) → MarkingObject

The clipto method, which is used to clip output operations to a specific MarkingObject

Parameters:

  • gs [GraphicsState] — the graphics state to use for setting the clip stack

Returns:

  • [MarkingObject] — the current MarkingObject instance

cliptrace(gs, force_placement) → MarkingObject

The cliptrace method, which is used by objects to trace the path of the object's clipping region Non-vector-based objects will probably trace a bounding box rectangle

Parameters:

  • gs [GraphicsState] — the GraphicsState to use to place the object
  • force_placement [Boolean] — calls place if true

Returns:

  • [MarkingObject] — the current MarkingObject instance

draw(gs) → MarkingObject

The draw method, which is used to draw or paint the object onto the underlying canvas or cr

Parameters:

  • gs [GraphicsState] — the GraphicsState to use to place the object

Returns:

  • [MarkingObject] — the current MarkingObject instance

parent_is_base? → Boolean   <private>

This method will return true if the MarkingObject is a DrawingContext

Returns:

  • [Boolean] — true if the parent is the base of the object hierarchy

parent_is_viewport? → Boolean

An interrogator method, which is used to determine if the MarkingObject is a Viewport Viewports are boundless and have special properties.

Returns:

  • [Boolean] — true if the MarkingObject is a Viewport

place(gs) → MarkingObject

The place method, which is used to place the object within the object heirarchy. This method sets the layout properties of the MarkingObject

Parameters:

  • gs [GraphicsState] — the GraphicsState to use to place the object

Returns:

  • [MarkingObject] — the current MarkingObject instance

reparent(parent, gs) → MarkingObject

The reparent method, which is used to set a new parent for an object

Parameters:

  • parent [MarkingObject] — the new parent for the MarkingObject
  • gs [GraphicsState] — the graphics state to use to set the new placement

Returns:

  • [MarkingObject] — the current MarkingObject instance

set(type, parent, scale, props) → MarkingObject

The set method which handles the foundation data and properties for each MarkingObject

Parameters:

  • type [Symbol] — the type of object
  • parent [MarkingObject or DrawingContext] — the parent of the MarkingObject
  • scale [Integer] — the unit scale of the MarkingObject
  • props [Array<Mixed>] — the additional object-specific properties of the MarkingObject

Returns:

  • [MarkingObject] — the current MarkingObject instance

set_hexagon_layout(gs, ee, orientation) → MarkingObject   <private>

Set the layout parameters for a hexagon

Parameters:

  • gs [GraphicsState] — the current graphics state
  • ee [Numeric] — the edge-to-edge size of the hexagon
  • orientation [Symbol] — the orientation of the hexagon: { :wide, :tall }

Returns:

  • [MarkingObject] — the current MarkingObject instance

set_image_layout(gs, surface) → MarkingObject   <private>

Set the layout parameters for an image

Parameters:

  • gs [GraphicsState] — the current graphics state
  • surface [Surface] — the Cairo surface containing the image data

Returns:

  • [MarkingObject] — the current MarkingObject instance

set_poly_layout(gs, minmax) → MarkingObject   <private>

Set the layout parameters for a polygon

Parameters:

  • gs [GraphicsState] — the current graphics state
  • minmax [Array<Numeric>] — the minimum and maximum x and y coordinates of the polygon

Returns:

  • [MarkingObject] — the current MarkingObject instance

set_radii_layout(gs, xr, yr) → MarkingObject   <private>

Set the layout parameters for an object defined by one or two radii

Parameters:

  • gs [GraphicsState] — the current graphics state
  • xr [Numeric] — the radius along the x axis
  • yr [Numeric] — the radius along the y axis (optional)

Returns:

  • [MarkingObject] — the current MarkingObject instance

set_text_layout(gs, font_layout, snap_to_ink) → MarkingObject   <private>

Set the layout parameters for a text object

Parameters:

  • gs [GraphicsState] — the current graphics state
  • font_layout [Pango::Layout] — the Pango layout object
  • snap_to_ink [Boolean] — true if we are snapping the layout to the ink extents

Returns:

  • [MarkingObject] — the current MarkingObject instance

set_wh_layout(gs, w, h) → MarkingObject   <private>

Set the layout parameters for an object defined by width/height parameters

Parameters:

  • gs [GraphicsState] — the current graphics state
  • w [Numeric] — the width of the object
  • h [Numeric] — the height of the object

Returns:

  • [MarkingObject] — the current MarkingObject instance

trace(gs, force_placement) → MarkingObject

The trace method, which is used by vector-based objects to trace the path of the object

Parameters:

  • gs [GraphicsState] — the GraphicsState to use to place the object
  • force_placement [Boolean] — calls place if true

Returns:

  • [MarkingObject] — the current MarkingObject instance

unclip(gs) → MarkingObject

The clipto method, which is used to clip output operations to a specific MarkingObject

Parameters:

  • gs [GraphicsState] — the graphics state to use for popping the clip stack

Returns:

  • [MarkingObject] — the current MarkingObject instance

update(props) → MarkingObject

The update method, which is used to reset an object's properties

Parameters:

  • props [Array<Mixed>] — the object-specific properties of the MarkingObject

Returns:

  • [MarkingObject] — the current MarkingObject instance

viewport → Viewport

The viewport method, which is used to return the viewport underlying the object heirarchy.

Returns:

  • [Viewport] — the viewport

Attribute Details

dc


layout


parent


props


scale


type


Class: PixMill::PangoText ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

The PangoText class is designed as a common text base class for TextPath and Text. It defines the Cairo/Pango layout interaction and should not be used by anyone directly.

Constructor Registry

Item
Attributes
new(parent, string, attr_list, scale, fontscale, snap_to_ink)
-

Method Registry

Item
Attributes
bbox → BoundingBox or Nil
-
cliptrace
-
gen_font_layout(gs)
<private>
load_font_attributes
<private>
place(gs) → PangoText
-
set(type, parent, string, attr_list, scale, fontscale, snap_to_ink) → PangoText
-
trace(gs, force_placement) → PangoText
-

Constructor Details

new(parent, string, attr_list, scale, fontscale, snap_to_ink)

The PangoText Constructor

Parameters:

  • parent [MarkingObject] — the parent of the path
  • string [String] — the text string to draw/render
  • attr_list [TextAttributeList] — the attribute list to apply to the string (optional)
  • scale [Integer] — the user unit scale of the text layout position (optional)
  • fontscale [Integer] — the user unit scale of the font size to use (optional)
  • snap_to_ink [Boolean] — true if the layout area should only include the inked portion (optional)

Method Details

bbox → BoundingBox or Nil

The bbox method, which is used to return the bounding box of the object within the object heirarchy

Returns:

  • [BoundingBox or Nil] — the bounding box of the object

cliptrace

Override the MarkingObject.cliptrace method

gen_font_layout(gs)   <private>

Parameters:

  • gs [GraphicsState] — the graphics state to use to generate the font layout

load_font_attributes   <private>


place(gs) → PangoText

Place the object using Pango infromation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object

Returns:

  • [PangoText] — the current pango text object

set(type, parent, string, attr_list, scale, fontscale, snap_to_ink) → PangoText

Set the text object's foundation data and properties

Parameters:

  • type [Symbol] — the type of text object: { :textpath, :text }
  • parent [MarkingObject] — the parent of the path
  • string [String] — the text string to draw/render
  • attr_list [TextAttributeList] — the attribute list to apply to the string (optional)
  • scale [Integer] — the user unit scale of the text layout position (optional)
  • fontscale [Integer] — the user unit scale of the font size to use (optional)
  • snap_to_ink [Boolean] — true if the layout area should only include the inked portion (optional)

Returns:

  • [PangoText] — the current pango text object

trace(gs, force_placement) → PangoText

Trace the text object's path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [PangoText] — the current pango text object

Class: PixMill::Path ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A path is an object defined and bounded by its path descriptor.

Constructor Registry

Item
Attributes
new(parent, desc, scale, gs)
-

Method Registry

Item
Attributes
place(gs) → Path
-
set(parent, desc, scale, gs) → Path
-
trace(gs, force_placement) → Path
-
trace_the_path(dc, origin)
<private>

Constructor Details

new(parent, desc, scale, gs)

The Path Constructor

Parameters:

  • parent [MarkingObject] — the parent of the path
  • desc [String] — the string descriptor of the path
  • scale [Integer] — the user unit scale of the polygon (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

place(gs) → Path

Place the path using path extents and the poly layout

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object

Returns:

  • [Path] — the current path

set(parent, desc, scale, gs) → Path

Set the path's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the path
  • desc [String] — the string descriptor of the path
  • scale [Integer] — the user unit scale of the polygon (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [Path] — the current path

trace(gs, force_placement) → Path

Trace the path's path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [Path] — the current path

trace_the_path(dc, origin)   <private>

Trace the path within the foundation context based on its position in the object hierarchy

Parameters:

  • dc [DrawingContext] — the underlying drawing context to trace the path onto
  • origin [Array<Numeric>] — the x,y origin settings for path tracing

Class: PixMill::PathDescriptor

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/pathdescriptor.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

SVG-style path descriptor parsing

Constructor Registry

Item
Attributes
new(desc)
-

Class Method Registry

Item
Attributes
crpath_to_desc(dc, use_relative_coords, separate_into_subpaths) → String or Nil
-
h(x, y, dx, rel) → String
-
join
<private>
l(x, y, dx, dy, rel) → String
-
m
<private>
r(x, y, w, h, rel) → String
-
rbody
<private>
rr(x, y, w, h, rx, ry, rel) → String
-
rrbody
<private>
v(x, y, dy, rel) → String
-

Method Registry

Item
Attributes
any_tokens? → Boolean
-
compile → Boolean
<private>
meshtrace(pattern, abs_x, abs_y, rel_x, rel_y)
-
set(desc) → Boolean
-
trace(dc, abs_x, abs_y, rel_x, rel_y)
-

Attribute Registry

Item
Attributes
desc
-
tokens
-

Constructor Details

new(desc)

The PathDescriptor initializer

Parameters:

  • desc [String] — the SVG-style path descriptor

Class Method Details

crpath_to_desc(dc, use_relative_coords, separate_into_subpaths) → String or Nil

Path Constructor Helper Method: Build a descriptor from the current Cairo path

Parameters:

  • dc [DrawingContext] — the (Cairo) drawing context with the current path
  • use_relative_coords [Boolean] — true if a relative descriptor is wanted
  • separate_into_subpaths [Boolean] — true if an array of subpaths is wanted

Returns:

  • [String or Nil] — the derived PathDescriptor or nil on error

h(x, y, dx, rel) → String

Path Constructor Helper Method: Horizontal Line

Parameters:

  • x [Numeric] — the x coordinate where to start the line
  • y [Numeric] — the y coordinate where to start the line
  • dx [Numeric] — the length of the line
  • rel [Boolean] — true if the start location is relative from a previous path location

Returns:

  • [String] — the string descriptor of the path

join   <private>


l(x, y, dx, dy, rel) → String

Path Constructor Helper Method: Line

Parameters:

  • x [Numeric] — the x coordinate where to start the line
  • y [Numeric] — the y coordinate where to start the line
  • dx [Numeric] — the x-axis length of the line
  • dy [Numeric] — the y-axis length of the line
  • rel [Boolean] — true if the start location is relative from a previous path location

Returns:

  • [String] — the string descriptor of the path

m   <private>


r(x, y, w, h, rel) → String

Path Constructor Helper Method: Rectangle

Parameters:

  • x [Numeric] — the x coordinate where to place the rectangle
  • y [Numeric] — the y coordinate where to place the rectangle
  • w [Numeric] — the width of the rectangle
  • h [Numeric] — the height of the rectangle
  • rel [Boolean] — true if the start location is relative from a previous path location

Returns:

  • [String] — the string descriptor of the path

rbody   <private>


rr(x, y, w, h, rx, ry, rel) → String

Path Constructor Helper Method: Rounded Rectangle

Parameters:

  • x [Numeric] — the x coordinate where to place the rectangle
  • y [Numeric] — the y coordinate where to place the rectangle
  • w [Numeric] — the width of the rectangle
  • h [Numeric] — the height of the rectangle
  • rx [Numeric] — the horizontal radius of the corners
  • ry [Numeric] — the vertical radius of the corners
  • rel [Boolean] — true if the start location is relative from a previous path location

Returns:

  • [String] — the string descriptor of the path

rrbody   <private>


v(x, y, dy, rel) → String

Path Constructor Helper Method: Vertical Line

Parameters:

  • x [Numeric] — the x coordinate where to start the line
  • y [Numeric] — the y coordinate where to start the line
  • dy [Numeric] — the length of the line
  • rel [Boolean] — true if the start location is relative from a previous path location

Returns:

  • [String] — the string descriptor of the path

Method Details

any_tokens? → Boolean

Are there any tokens in the tokens list?

Returns:

  • [Boolean] — true if there is a valid token list

compile → Boolean   <private>

Compile the given SVG-style path descriptor into component parts

Returns:

  • [Boolean] — true if the path descriptor compiled cleanly

meshtrace(pattern, abs_x, abs_y, rel_x, rel_y)

Trace the path within a MeshPattern patch

Parameters:

  • pattern [Cairo::MeshPattern] — the mesh pattern to trace the path within
  • abs_x [Lambda] — a conversion lambda for absolute x coordinate data
  • abs_y [Lambda] — a conversion lambda for absolute y coordinate data
  • rel_x [Lambda] — a conversion lambda for relative x coordinate data
  • rel_y [Lambda] — a conversion lambda for relative y coordinate data

set(desc) → Boolean

Set the PathDescriptor to a new SVG-style descriptor

Parameters:

  • desc [String] — the SVG-style path descriptor

Returns:

  • [Boolean] — true if the new descriptor compiled cleanly and there are tokens to be processed

trace(dc, abs_x, abs_y, rel_x, rel_y)

Trace the path in a Cairo context

Parameters:

  • dc [DrawingContext] — the drawing context to trace the path within
  • abs_x [Lambda] — a conversion lambda for absolute x coordinate data
  • abs_y [Lambda] — a conversion lambda for absolute y coordinate data
  • rel_x [Lambda] — a conversion lambda for relative x coordinate data
  • rel_y [Lambda] — a conversion lambda for relative y coordinate data

Attribute Details

desc


tokens


Class: PixMill::PathEngine

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/pathengine.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

An engine to draw paths onto a DrawingContext using shorthand / assembler type instructions

Constructor Registry

Item
Attributes
new(gs, context)
-

Method Registry

Item
Attributes
circle
<private>
clipto
-
dispatch(op, args)
<private>
dx(dx)
-
dxy(dx, dy)
-
dy(dy)
-
earc_check
<private>
ellipse
<private>
ellipse_check
<private>
flush
-
method_missing
<private>
pop
-
push
-
qpath(nquads, radius, pts, dir)
-
run(block)
-
setff
-
setgs
-

Attribute Registry

Item
Attributes
gs
-

Constructor Details

new(gs, context)

Parameters:

  • gs [GraphicsState] — the graphics state to draw the paths onto
  • context [Context] — the Ruby language domain context to parse instructions from

Method Details

circle   <private>


clipto

sets a clipping region within the current graphics state

dispatch(op, args)   <private>

The Instruction Dispatcher, PathEngine's beating heart

Parameters:

  • op [Numeric] — the operation to parse and operate on
  • args [Array<Mixed>] — the arguments to the operation, depends on the operation being handled

dx(dx)

This method draws a horizontal line.

Parameters:

  • dx [Numeric] — the length of the horizontal line to draw

dxy(dx, dy)

This family of methods draws a line from the current point to a point dx,dy units away.

Parameters:

  • dx [Numeric] — the horizontal offset of the destination point of the line
  • dy [Numeric] — the vertical offset of the destination point of the line

dy(dy)

This family of methods draws a vertical line.

Parameters:

  • dy [Numeric] — the length of the vertical line to draw

earc_check   <private>


ellipse   <private>


ellipse_check   <private>


flush

flushes pending stroke/fill operations

method_missing   <private>


pop

pops the current graphics state and path engine flush flag for subsequent processing

push

pushes the current graphics state and path engine flush flag for subsequent processing in a new environment

qpath(nquads, radius, pts, dir)

Parameters:

  • nquads [Integer] — the number of quadrants to draw
  • radius [Numeric] — the radius around the circle to draw at
  • pts [Hash or Array] — a set of points to transform
  • dir [Symbol] — the direction around the circle to do the drawing { :cw, :ccw }

run(block)

launches the DSL (Domain-Specific Language) context

Parameters:

  • block [Block] — a Ruby code block that will host the DSL

setff

sets the "path engine flush flag" value

setgs

modifies the attached graphics state

Attribute Details

gs


Class: PixMill::Polygon ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A polygon is an object defined and bounded by its vertex list.

Constructor Registry

Item
Attributes
new(parent, pts, closed, scale, gs)
-

Method Registry

Item
Attributes
place(gs) → Polygon
-
set(parent, pts, closed, scale, gs) → Polygon
-
trace(gs, force_placement) → Polygon
-
xyvec → Array<Numeric>
<private>

Constructor Details

new(parent, pts, closed, scale, gs)

The Polygon Constructor

Parameters:

  • parent [MarkingObject] — the parent of the polygon
  • pts [Array<Numeric>] — the xy coordinate list of the polygon
  • closed [Boolean] — the end path status of the polygon, true if closed
  • scale [Integer] — the user unit scale of the polygon (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

place(gs) → Polygon

Place the polygon using the poly layout

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object

Returns:

  • [Polygon] — the current polygon

set(parent, pts, closed, scale, gs) → Polygon

Set the polygon's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the polygon
  • pts [Array<Numeric>] — the xy coordinate list of the polygon
  • closed [Boolean] — the end path status of the polygon, true if closed
  • scale [Integer] — the user unit scale of the polygon (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [Polygon] — the current polygon

trace(gs, force_placement) → Polygon

Trace the polygon's path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [Polygon] — the current polygon

xyvec → Array<Numeric>   <private>

Calculate the polygon's vertex list in relation to its parent

Returns:

  • [Array<Numeric>] — the adjusted vertices of the hexagon

Class: PixMill::Rectangle ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A Rectangle is a quadrilateral object defined and bounded by its width and height. A rounded rectangle also has radii properties that define its corners

Constructor Registry

Item
Attributes
new(parent, w, h, xr, yr, scale, gs)
-

Method Registry

Item
Attributes
place(gs) → Rectangle
-
set(parent, w, h, xr, yr, scale, gs) → Rectangle
-
trace(gs, force_placement) → Rectangle
-
xywhrr → Array<Numeric>
<private>

Constructor Details

new(parent, w, h, xr, yr, scale, gs)

The Rectangle Constructor

Parameters:

  • parent [MarkingObject] — the parent of the rectangle
  • w [Numeric] — the width of the rectangle
  • h [Numeric] — the height of the rectangle
  • xr [Numeric] — the horizontal radius of the rectangle's rounded corners (optional)
  • yr [Numeric] — the vertical radius of the rectangle's rounded corners (optional)
  • scale [Integer] — the user unit scale of the rectangle (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

place(gs) → Rectangle

Place the rectangle using the wh layout

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object

Returns:

  • [Rectangle] — the current rectangle

set(parent, w, h, xr, yr, scale, gs) → Rectangle

Set the rectangle's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the rectangle
  • w [Numeric] — the width of the rectangle
  • h [Numeric] — the height of the rectangle
  • xr [Numeric] — the horizontal radius of the rectangle's rounded corners (optional)
  • yr [Numeric] — the vertical radius of the rectangle's rounded corners (optional)
  • scale [Integer] — the user unit scale of the rectangle (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [Rectangle] — the current rectangle

trace(gs, force_placement) → Rectangle

Trace the rectangle's path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [Rectangle] — the current rectangle

xywhrr → Array<Numeric>   <private>

Calculate the rectangle's rounded corner parameters when tracing it

Returns:

  • [Array<Numeric>] — the x, y, w, h and radii parameters to use when tracing the rounded rectangle

Class: PixMill::Shader

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/shader.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.

Overview

This class is an interface class that will contain and classify Gouraud, Coons and Tensor mesh pattern shaders, as supported by the Cairo library.

Constructor Registry

Item
Attributes
new(dict)
-

Method Registry

Item
Attributes
process_dict(dict) → Shader
<private>

Constructor Details

new(dict)

This class constructor may be used to convert a given mesh pattern dictionary into a Shader object or it may be used to create a blank pattern for dynamic creation.

Parameters:

  • dict [Hash or Nil] — the dictionary containing the shader information regarding type and colors
    • :type [Symbol] — the type of dictionary
    • :triangles [Array<Array<Float>>] — the array of 3-element color vertex array (if :type == :triangles)

Method Details

process_dict(dict) → Shader   <private>

This method processes the specified shader dictionary and sets the internal Shader operating parameters.

Parameters:

  • dict [Hash] — the dictionary containing the shader information regarding type and colors
    • :type [Symbol] — the type of dictionary
    • :triangles [Array<Array<Float>>] — the array of 3-element color vertex array (if :type == :triangles)

Returns:

  • [Shader] — the Shader instance

Class: PixMill::Text ← PixMill::PangoText

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

This class is uses a simplified API and differs from TextPath in that: - trace operations are not supported - the use of TextAttributeLists are not supported - it relies on Pango's markup text extensions to support attributes - text colors are used, not fill (important distinction!)

Constructor Registry

Item
Attributes
new(parent, string, scale, fontscale, snap_to_ink, gs)
-

Method Registry

Item
Attributes
cliptrace(gs, force_placement) → Text
-
draw(gs) → Text
-
set(parent, string, scale, fontscale, snap_to_ink, gs) → Text
-
trace
-

Constructor Details

new(parent, string, scale, fontscale, snap_to_ink, gs)

The TextPath Constructor

Parameters:

  • parent [MarkingObject] — the parent of the path
  • string [String] — the text string to draw/render
  • scale [Integer] — the user unit scale of the text layout position (optional)
  • fontscale [Integer] — the user unit scale of the font size to use (optional)
  • snap_to_ink [Boolean] — true if the layout area should only include the inked portion (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

cliptrace(gs, force_placement) → Text

Trace the text object's area onto the object heirarchy foundation for clipping purposes

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [Text] — the current text object

draw(gs) → Text

Draw the text stream into the layout area

Parameters:

  • gs [GraphicsState] — the graphics state to use to color the object

Returns:

  • [Text] — the current text object

set(parent, string, scale, fontscale, snap_to_ink, gs) → Text

Set the Text's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the path
  • string [String] — the text string to draw/render
  • scale [Integer] — the user unit scale of the text layout position (optional)
  • fontscale [Integer] — the user unit scale of the font size to use (optional)
  • snap_to_ink [Boolean] — true if the layout area should only include the inked portion (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [Text] — the current text object

trace

Override the MarkingObject.trace method

Class: PixMill::TextAttributeList

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/textattributelist.rbRubyKenneth F. GuerinCopyright © 2017-2021, Kenneth F. Guerin, all rights reserved.

Overview

Constructor Registry

Item
Attributes
new
-

Method Registry

Item
Attributes
add_background(value, si, ei) → TextAttributeList
-
add_fill(value, si, ei) → TextAttributeList
-
add_font_style(value, si, ei) → TextAttributeList
-
add_font_variant(value, si, ei) → TextAttributeList
-
add_rise(value, si, ei) → TextAttributeList
-
add_stretch(value, si, ei) → TextAttributeList
-
add_strikethrough(si, ei) → TextAttributeList
-
add_strikethrough_color(value, si, ei) → TextAttributeList
-
add_stroke(value, si, ei) → TextAttributeList
-
add_stroke_width(value, si, ei) → TextAttributeList
-
add_subscript(value, si, ei) → TextAttributeList
-
add_superscript(value, si, ei) → TextAttributeList
-
add_underline(value, si, ei) → TextAttributeList
-
add_underline_color(value, si, ei) → TextAttributeList
-
add_weight(value, si, ei) → TextAttributeList
-
any_drawing_attributes? → Boolean
-
any_layout_attributes? → Boolean
-
collect_drawing_attributes → TextAttributeList
-
each_layout_attribute → TextAttributeList
-
lenadd_font_rel_sizegth(value, si, ei) → TextAttributeList
-
length → Integer
-
length
-

Constructor Details

new


Method Details

add_background(value, si, ei) → TextAttributeList

Parameters:

  • value [PaintSpecification] — the paint specification
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_fill(value, si, ei) → TextAttributeList

Parameters:

  • value [PaintSpecification] — the paint specification
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_font_style(value, si, ei) → TextAttributeList

Parameters:

  • value [Numeric] — the scale factor to apply to the base font size of the string
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_font_variant(value, si, ei) → TextAttributeList

Parameters:

  • value [Symbol] — the variant to apply to the string
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_rise(value, si, ei) → TextAttributeList

Parameters:

  • value [Numeric] — the scale factor to apply to the vertical placement of the string, based on the font size
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_stretch(value, si, ei) → TextAttributeList

Parameters:

  • value [Symbol] — the stretch attribute to apply to the string
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_strikethrough(si, ei) → TextAttributeList

Parameters:

  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_strikethrough_color(value, si, ei) → TextAttributeList

Parameters:

  • value [PaintSpecification] — the paint specification
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_stroke(value, si, ei) → TextAttributeList

Parameters:

  • value [PaintSpecification] — the paint specification
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_stroke_width(value, si, ei) → TextAttributeList

Parameters:

  • value [Numeric] — the paint specification
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_subscript(value, si, ei) → TextAttributeList

Parameters:

  • value [Integer] — the subscript level the string, where 1 is the first subscript level
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_superscript(value, si, ei) → TextAttributeList

Parameters:

  • value [Integer] — the superscript level the string, where 1 is the first superscript level
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_underline(value, si, ei) → TextAttributeList

Parameters:

  • value [Symbol] — the type of underline to apply to the string
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_underline_color(value, si, ei) → TextAttributeList

Parameters:

  • value [PaintSpecification] — the paint specification
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

add_weight(value, si, ei) → TextAttributeList

Parameters:

  • value [Numeric or Symbol] — the weight factor to apply to the string
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

any_drawing_attributes? → Boolean

Returns:

  • [Boolean] — if there are any drawing attributes

any_layout_attributes? → Boolean

Returns:

  • [Boolean] — if there are any layout attributes

collect_drawing_attributes → TextAttributeList

Returns:

  • [TextAttributeList] — the current text attributes list

each_layout_attribute → TextAttributeList

Returns:

  • [TextAttributeList] — the current text attributes list

lenadd_font_rel_sizegth(value, si, ei) → TextAttributeList

Parameters:

  • value [Numeric] — the scale factor to apply to the base font size of the string
  • si [Integer] — the starting index within the string to apply the attribute
  • ei [Integer] — the ending index within the string to apply the attribute

Returns:

  • [TextAttributeList] — the current text attributes list

length → Integer

Returns:

  • [Integer] — the size of the combined attribute lists

length


Class: PixMill::TextPath ← PixMill::PangoText

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

This class differs from Text in that: - background fill operations are not supported. - snap-to-ink is always enabled as we're not as interested with doing text display layout - trace operations are real - fill colors are used, not text (important distinction!) - embedded markup is not supported

Constructor Registry

Item
Attributes
new(parent, string, scale, fontscale, gs)
-

Method Registry

Item
Attributes
cliptrace(gs, force_placement) → TextPath
-
draw(gs) → TextPath
-
set(parent, string, scale, fontscale, gs) → TextPath
-
trace(gs, force_placement) → TextPath
-

Constructor Details

new(parent, string, scale, fontscale, gs)

The TextPath Constructor

Parameters:

  • parent [MarkingObject] — the parent of the path
  • string [String] — the text string to draw/render
  • scale [Integer] — the user unit scale of the text layout position (optional)
  • fontscale [Integer] — the user unit scale of the font size to use (optional)
  • gs [GraphicsState] — the graphics state to use to place the object on initialization (optional)

Method Details

cliptrace(gs, force_placement) → TextPath

Trace the text object's clipping path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [TextPath] — the current text path

draw(gs) → TextPath

Draw the text path into the layout area

Parameters:

  • gs [GraphicsState] — the graphics state to use to color the object

Returns:

  • [TextPath] — the current text object

set(parent, string, scale, fontscale, gs) → TextPath

Set the TextPath's foundation data and properties

Parameters:

  • parent [MarkingObject] — the parent of the path
  • string [String] — the text string to draw/render
  • scale [Integer] — the user unit scale of the text layout position (optional)
  • fontscale [Integer] — the user unit scale of the font size to use (optional)
  • gs [GraphicsState] — the graphics state to use to place the object (optional)

Returns:

  • [TextPath] — the current text path

trace(gs, force_placement) → TextPath

Trace the text object's path onto the object heirarchy foundation

Parameters:

  • gs [GraphicsState] — the graphics state to use to place the object
  • force_placement [Boolean] — true to re-place the object

Returns:

  • [TextPath] — the current text path

Class: PixMill::Viewport ← PixMill::MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/markingobjects.rbRubyKenneth F. GuerinCopyright © 2018-2021, Kenneth F. Guerin, all rights reserved.

Overview

A Viewport is a dimensionless object that sits at some offset from context's origin. This offset is usually 0,0, but can be changed. Viewports are designed to be root objects in the MarkingObject stack. As such, viewport's parents must be CRs: DrawingContexts or CompositeDrawingContexts.

Constructor Registry

Item
Attributes
new(parent, x, y)
-

Method Registry

Item
Attributes
bbox → BoundingBox
-
set(parent, x, y) → Viewport
-

Constructor Details

new(parent, x, y)

The Viewport Constructor

Parameters:

  • parent [DrawingContext or CompositeDrawingContext] — the parent of the viewport
  • x [Integer] — the horizontal offset of the viewport's origin
  • y [Integer] — the vertical offset of the viewport's origin

Method Details

bbox → BoundingBox

Return the viewport's bounding box

Returns:

  • [BoundingBox] — the bounding box of the viewport

set(parent, x, y) → Viewport

Set the viewport's foundation data and properties

Parameters:

  • parent [DrawingContext or CompositeDrawingContext] — the parent of the viewport
  • x [Integer] — the horizontal offset of the viewport's origin within the parent's coordinate space
  • y [Integer] — the vertical offset of the viewport's origin within the parent's coordinate space

Returns:

  • [Viewport] — the current viewport

Cruby: PixMill

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/init.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

Function: PixMill::Init_pixmill

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/init.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

This function creates the PixMill Ruby module and initializes / requires various subclasses within it.

The following subclasses are created and/or loaded into the PixMill module space: - PixMill::NativeColor - PixMill::Surface (C/Cairo) - PixMill::Pattern (C/Cairo) - PixMill::DrawingContext (C/Cairo) - PixMill::FontDescription (C/Pango) - PixMill::FontLayout (C/Pango) - PixMill::FontLayoutIter (C/Pango) - PixMill::FontAttributeList (C/Pango) - PixMill::Canvas (C) - PixMill::Composites (Ruby) - PixMill::ColorTools (Ruby) - PixMill::ColorTable (Ruby) - PixMill::Shader (Ruby) - PixMill::GraphicsState (Ruby) - PixMill::BoundingBox (Ruby) - PixMill::TextAttibuteList (Ruby) - PixMill::PathDescriptor (Ruby) - PixMill::PathEngine (Ruby) - PixMill::MarkingObjects (Ruby)

Cruby: PixMill::Canvas

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/canvas.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

Function: PixMill::Canvas::rb_canvas_flip ⟼ flip

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/canvas.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

This function flips the contents of the PixMill::Canvas object.

Function: PixMill::Canvas::rb_canvas_initialize ⟼ initialize

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/canvas.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

This function implements the PixMill::Canvas constructor.

Function: PixMill::Canvas::rb_canvas_rootbox ⟼ rootbox

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/canvas.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

This function returns the rootbox of the PixMill::Canvas object.

Function: PixMill::Canvas::rb_canvas_save ⟼ save

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/canvas.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

This function exports the contents of the PixMill::Canvas object as one or more image files.

Cruby: PixMill::DrawingContext

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/cairo-context.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

A functional interface to cairo_t* and associated data.

Cruby: PixMill::FontAttributeList

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/pango-attrlist.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

A functional interface to PangoAttrList* and associated data.

Cruby: PixMill::FontDescription

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/pango-fontdesc.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

A functional interface to PangoFontDescription* and associated data.

Cruby: PixMill::FontLayout

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/pango-layout.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

A functional interface to PangoLayout* and associated data.

Cruby: PixMill::FontLayoutIter

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/pango-iter.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

A functional interface to PangoLayoutIter* and associated data.

Cruby: PixMill::NativeColor

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/ncolor.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

A native definition of color definitions used by Cairo.

Cruby: PixMill::Pattern

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/cairo-pattern.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

A functional interface to cairo_pattern_t* and associated data.

Cruby: PixMill::Surface

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
ext/pixmill/cairo-surface.cCKenneth F. GuerinCopyright © 2020-2021, Kenneth F. Guerin, all rights reserved.

Overview

A functional interface to cairo_surface_t* and associated data.

Module: Stencil

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
lib/pixmill/stencil/fleur-de-lis.rbRubyKenneth F. GuerinCopyright © 2022, Kenneth F. Guerin, all rights reserved.
lib/pixmill/stencil/gear.rbRubyKenneth F. GuerinCopyright © 2022, Kenneth F. Guerin, all rights reserved.
lib/pixmill/stencil/star.rbRubyKenneth F. GuerinCopyright © 2022, Kenneth F. Guerin, all rights reserved.

Overview

Method Registry

Item
Attributes
build → String
-

Method Details

build → String

This method will build a path descriptior snippet.

Returns:

  • [String] — the path descriptor snippet

This documentation page was generated by the Codoc gem on 23-Nov-2025 at 19:59:50.
Library Documentation Page
The PixMill Graphics Toolkit
Overview
PixMill (namespace)
PixMill.BoundingBox (class)
PixMill.Canvas (class)
PixMill.Circle ( ← PixMill.MarkingObject)
PixMill.ColorTable (class)
PixMill.Ellipse ( ← PixMill.MarkingObject)
PixMill.GradientPattern (class)
PixMill.Graphic ( ← PixMill.MarkingObject)
PixMill.GraphicsState (class)
PixMill.Hexagon ( ← PixMill.MarkingObject)
PixMill.MarkingObject (class)
PixMill.Path ( ← PixMill.MarkingObject)
PixMill.PathDescriptor (class)
PixMill.Pattern (class)
PixMill.Polygon ( ← PixMill.MarkingObject)
PixMill.Rectangle ( ← PixMill.MarkingObject)
PixMill.SolidPattern (class)
PixMill.SurfacePattern (class)
PixMill.Text ( ← PixMill.MarkingObject)
PixMill.TextAttributes (class)
PixMill.Viewport ( ← PixMill.MarkingObject)

Overview

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
boundingBox.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
canvas.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
colorTable.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
colorTools.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
defctab.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
graphicsState.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
ncsctab.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
pathDescriptor.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
pattern.jsJavascriptKenneth F. GuerinCopyright © 2025, Brick Mill Games, LLC, all rights reserved.
pixmill.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
resenectab.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
textAttributes.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
w3cctab.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Contents Directory

Objects
N PixMill
C PixMill.BoundingBox
C PixMill.Canvas
C PixMill.Circle ← PixMill.MarkingObject
C PixMill.ColorTable
C PixMill.Ellipse ← PixMill.MarkingObject
C PixMill.GradientPattern
C PixMill.Graphic ← PixMill.MarkingObject
C PixMill.GraphicsState
C PixMill.Hexagon ← PixMill.MarkingObject
C PixMill.MarkingObject
C PixMill.Path ← PixMill.MarkingObject
C PixMill.PathDescriptor
C PixMill.Pattern
C PixMill.Polygon ← PixMill.MarkingObject
C PixMill.Rectangle ← PixMill.MarkingObject
C PixMill.SolidPattern
C PixMill.SurfacePattern
C PixMill.Text ← PixMill.MarkingObject
C PixMill.TextAttributes
C PixMill.Viewport ← PixMill.MarkingObject
Constants & Methods
• PixMill.CTAB_IGNORE (PixMill)
• PixMill.CTAB_OVERWRITE (PixMill)
• PixMill.CTAB_THROWS (PixMill)
• PixMill.DEFCTab (PixMill)
• PixMill.GRAVITIES (PixMill)
• PixMill.LAYOUTS (PixMill)
• PixMill.NCSCTab (PixMill)
• PixMill.ReseneCTab (PixMill)
• PixMill.STRETCHES (PixMill)
• PixMill.STYLES (PixMill)
• PixMill.UNDERLINES (PixMill)
• PixMill.VARIANTS (PixMill)
• PixMill.W3CCTab (PixMill)
• PixMill.WEIGHTS (PixMill)
• PixMill.colorToGrayRGBCspec (PixMill)
• PixMill.convertCMYKACspec (PixMill)
• PixMill.convertCMYKACspecToCMYKCspec (PixMill)
• PixMill.convertCMYKCspec (PixMill)
• PixMill.convertRGBACspec (PixMill)
• PixMill.convertRGBACspecToRGBCspec (PixMill)
• PixMill.convertRGBCspec (PixMill)
• PixMill.extractAlphaFromCMYKACspec (PixMill)
• PixMill.extractAlphaFromRGBACspec (PixMill)
• PixMill.isGrayRGBCspec (PixMill)
• PixMill.isValidCMYKACspec (PixMill)
• PixMill.isValidCMYKCspec (PixMill)
• PixMill.isValidRGBACspec (PixMill)
• PixMill.isValidRGBCspec (PixMill)
• PixMill.randomGrayRGBCspec (PixMill)
• PixMill.randomRGBCspec (PixMill)
• PixMill.typeOfCMYKACspec (PixMill)
• PixMill.typeOfCMYKCspec (PixMill)
• PixMill.typeOfRGBACspec (PixMill)
• PixMill.typeOfRGBCspec (PixMill)
• bottomleft (PixMill.BoundingBox)
• bottomright (PixMill.BoundingBox)
• center (PixMill.BoundingBox)
• move (PixMill.BoundingBox)
• moveTo (PixMill.BoundingBox)
• moved (PixMill.BoundingBox)
• position (PixMill.BoundingBox)
• rect (PixMill.BoundingBox)
• resize (PixMill.BoundingBox)
• resizeTo (PixMill.BoundingBox)
• resized (PixMill.BoundingBox)
• setFromBox (PixMill.BoundingBox)
• setFromCxyr (PixMill.BoundingBox)
• setFromCxywh (PixMill.BoundingBox)
• setFromCxyxryr (PixMill.BoundingBox)
• setFromPts (PixMill.BoundingBox)
• setFromXywh (PixMill.BoundingBox)
• size (PixMill.BoundingBox)
• toArray (PixMill.BoundingBox)
• toString (PixMill.BoundingBox)
• topleft (PixMill.BoundingBox)
• topright (PixMill.BoundingBox)
• xywh (PixMill.BoundingBox)
• rootbox (PixMill.Canvas)
• erase (PixMill.Canvas)
• reset (PixMill.Canvas)
• setid (PixMill.Canvas)
• place (PixMill.Circle) <overload>
• set (PixMill.Circle) <overload>
• trace (PixMill.Circle) <overload>
• delete (PixMill.ColorTable)
• get (PixMill.ColorTable)
• getAllHtmlValues (PixMill.ColorTable)
• getClosestCspecKey (PixMill.ColorTable)
• getCspecDifference (PixMill.ColorTable)
• getHtmlSpec (PixMill.ColorTable)
• hasKey (PixMill.ColorTable)
• keys (PixMill.ColorTable)
• load (PixMill.ColorTable)
• set (PixMill.ColorTable)
• place (PixMill.Ellipse) <overload>
• set (PixMill.Ellipse) <overload>
• trace (PixMill.Ellipse) <overload>
• draw (PixMill.Graphic) <overload>
• place (PixMill.Graphic) <overload>
• set (PixMill.Graphic) <overload>
• trace (PixMill.Graphic) <overload>
• $bezierMinMax (PixMill.GraphicsState) <private>
• $collectPathExtents (PixMill.GraphicsState) <private>
• $configSource (PixMill.GraphicsState) <private>
• $extractHtml5Cspec (PixMill.GraphicsState) <private>
• $fillProc (PixMill.GraphicsState) <private>
• $genCanvasBBox (PixMill.GraphicsState) <private>
• $getHeight (PixMill.GraphicsState) <private>
• $getWidth (PixMill.GraphicsState) <private>
• $quadraticMinMax (PixMill.GraphicsState) <private>
• $strokeProc (PixMill.GraphicsState) <private>
• arc (PixMill.GraphicsState)
• arcTo (PixMill.GraphicsState)
• beginPath (PixMill.GraphicsState)
• bezierCurveTo (PixMill.GraphicsState)
• clipto (PixMill.GraphicsState)
• clone (PixMill.GraphicsState)
• closePath (PixMill.GraphicsState)
• copyPath (PixMill.GraphicsState)
• ellipse (PixMill.GraphicsState)
• getPathExtents (PixMill.GraphicsState)
• lineTo (PixMill.GraphicsState)
• moveTo (PixMill.GraphicsState)
• paint (PixMill.GraphicsState)
• pathToSvgPath (PixMill.GraphicsState)
• pop (PixMill.GraphicsState)
• popAll (PixMill.GraphicsState)
• push (PixMill.GraphicsState)
• quadraticCurveTo (PixMill.GraphicsState)
• rect (PixMill.GraphicsState)
• reset (PixMill.GraphicsState)
• restorePath (PixMill.GraphicsState)
• rrect (PixMill.GraphicsState)
• savePath (PixMill.GraphicsState)
• set (PixMill.GraphicsState)
• strokeFill (PixMill.GraphicsState)
• unclip (PixMill.GraphicsState)
• place (PixMill.Hexagon) <overload>
• set (PixMill.Hexagon) <overload>
• trace (PixMill.Hexagon) <overload>
• $calcDim (PixMill.MarkingObject) <private> <deprecate>
• $parentIsBase (PixMill.MarkingObject) <private>
• $parentIsViewport (PixMill.MarkingObject) <private>
• bbox (PixMill.MarkingObject)
• clipto (PixMill.MarkingObject)
• cliptrace (PixMill.MarkingObject)
• draw (PixMill.MarkingObject)
• place (PixMill.MarkingObject)
• set (PixMill.MarkingObject)
• setHexagonLayout (PixMill.MarkingObject) <protected>
• setImageLayout (PixMill.MarkingObject) <protected>
• setPolyLayout (PixMill.MarkingObject) <protected>
• setRadiiLayout (PixMill.MarkingObject) <protected>
• setTextLayout (PixMill.MarkingObject) <protected>
• setWhLayout (PixMill.MarkingObject) <protected>
• trace (PixMill.MarkingObject)
• unclip (PixMill.MarkingObject)
• update (PixMill.MarkingObject)
• viewport (PixMill.MarkingObject)
• place (PixMill.Path) <overload>
• set (PixMill.Path) <overload>
• trace (PixMill.Path) <overload>
• $compile (PixMill.PathDescriptor) <private>
• anyTokens (PixMill.PathDescriptor)
• set (PixMill.PathDescriptor)
• trace (PixMill.PathDescriptor)
• $getPathAnchorInfo (PixMill.Pattern) <private>
• place (PixMill.Polygon) <overload>
• set (PixMill.Polygon) <overload>
• trace (PixMill.Polygon) <overload>
• place (PixMill.Rectangle) <overload>
• set (PixMill.Rectangle) <overload>
• trace (PixMill.Rectangle) <overload>
• cliptrace (PixMill.Text) <overload>
• draw (PixMill.Text) <overload>
• place (PixMill.Text) <overload>
• set (PixMill.Text) <overload>
• trace (PixMill.Text) <overload>
• anyDrawingAttributes (PixMill.TextAttributes)
• anyLayoutAttributes (PixMill.TextAttributes)
• anyUnderlineAttributes (PixMill.TextAttributes)
• length (PixMill.TextAttributes)
• $addToDrawingAttributes (PixMill.TextAttributes) <private>
• $addToLayoutAttributes (PixMill.TextAttributes) <private>
• addBackground (PixMill.TextAttributes)
• addFill (PixMill.TextAttributes)
• addFontRelSize (PixMill.TextAttributes)
• addFontStyle (PixMill.TextAttributes)
• addFontVariant (PixMill.TextAttributes)
• addRise (PixMill.TextAttributes)
• addStretch (PixMill.TextAttributes)
• addStrikethrough (PixMill.TextAttributes)
• addStrikethroughColor (PixMill.TextAttributes)
• addStroke (PixMill.TextAttributes)
• addStrokeWidth (PixMill.TextAttributes)
• addSubscript (PixMill.TextAttributes)
• addSuperscript (PixMill.TextAttributes)
• addUnderline (PixMill.TextAttributes)
• addUnderlineColor (PixMill.TextAttributes)
• addWeight (PixMill.TextAttributes)
• collectDrawingAttributes (PixMill.TextAttributes)
• eachBackgroundLayoutAttribute (PixMill.TextAttributes)
• eachDrawingAttribute (PixMill.TextAttributes)
• eachLayoutAttribute (PixMill.TextAttributes)
• eachSpecificDrawingAttribute (PixMill.TextAttributes)
• eachSpecificLayoutAttribute (PixMill.TextAttributes)
• eachUnderlineLayoutAttribute (PixMill.TextAttributes)
• bbox (PixMill.Viewport) <overload>
• set (PixMill.Viewport) <overload>

Namespace: PixMill

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
boundingBox.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
canvas.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
colorTable.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
colorTools.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
defctab.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
graphicsState.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
ncsctab.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
pathDescriptor.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
pattern.jsJavascriptKenneth F. GuerinCopyright © 2025, Brick Mill Games, LLC, all rights reserved.
pixmill.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.
resenectab.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
textAttributes.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.
w3cctab.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

The PixMill namespace encapsulates all definitions related to the family of PixMill classes.

The PixMill library is a library which handles graphics drawing and layouts to a canvas, which sits on top of a Javascript Canvas object.

Constant Registry

Item
Attributes
PixMill.CTAB_IGNORE → Integer
<read-only>
PixMill.CTAB_OVERWRITE → Integer
<read-only>
PixMill.CTAB_THROWS → Integer
<read-only>
PixMill.DEFCTab → Object
<read-only>
PixMill.GRAVITIES → Array<String>
<read-only>
PixMill.LAYOUTS → Array<String>
<read-only>
PixMill.NCSCTab → Object
<read-only>
PixMill.ReseneCTab → Object
<read-only>
PixMill.STRETCHES → Array<String>
<read-only>
PixMill.STYLES → Array<String>
<read-only>
PixMill.UNDERLINES → Array<String>
<read-only>
PixMill.VARIANTS → Array<String>
<read-only>
PixMill.W3CCTab → Object
<read-only>
PixMill.WEIGHTS → Array<String>
<read-only>

Function Registry

Item
Attributes
PixMill.colorToGrayRGBCspec(cspec) → String or Array<Number> or Null
-
PixMill.convertCMYKACspec(type, cspec) → String or Array<Number> or Null ⇏ ArgumentError
-
PixMill.convertCMYKACspecToCMYKCspec(cspec) → String or Array<Number> or Null
-
PixMill.convertCMYKCspec(type, cspec) → String or Array<Number> or Null ⇏ ArgumentError
-
PixMill.convertRGBACspec(type, cspec) → String or Array<Number> or Null ⇏ ArgumentError
-
PixMill.convertRGBACspecToRGBCspec(cspec) → String or Array<Number> or Null
-
PixMill.convertRGBCspec(type, cspec) → String or Array<Number> or Null ⇏ ArgumentError
-
PixMill.extractAlphaFromCMYKACspec(cspec) → String or Number or Null
-
PixMill.extractAlphaFromRGBACspec(cspec) → String or Number or Null
-
PixMill.isGrayRGBCspec(cspec) → Boolean
-
PixMill.isValidCMYKACspec(cspec) → Boolean
-
PixMill.isValidCMYKCspec(cspec) → Boolean
-
PixMill.isValidRGBACspec(cspec) → Boolean
-
PixMill.isValidRGBCspec(cspec) → Boolean
-
PixMill.randomGrayRGBCspec(base, range, type) → String or Array<Number> ⇏ ArgumentError
-
PixMill.randomRGBCspec(base, range, type) → String or Array<Number> ⇏ ArgumentError
-
PixMill.typeOfCMYKACspec(cspec) → String or Null
-
PixMill.typeOfCMYKCspec(cspec) → String or Null
-
PixMill.typeOfRGBACspec(cspec) → String or Null
-
PixMill.typeOfRGBCspec(cspec) → String or Null
-

Constant Details

PixMill.CTAB_IGNORE → Integer   <read-only>

This constant is used to specify that attempts to load duplicate entries into a color table will be ignored.

PixMill.CTAB_OVERWRITE → Integer   <read-only>

This constant is used to specify that attempts to load duplicate entries into a color table will be overwrite the existing specification.

PixMill.CTAB_THROWS → Integer   <read-only>

This constant is used to specify that attempts to load duplicate entries into a color table will cause an exception to be thrown.

PixMill.DEFCTab → Object   <read-only>

This object contains a very simple color table of names and color specifications.

PixMill.GRAVITIES → Array<String>   <read-only>

This constant contains an array of possible object gravity layout locations as strings.

PixMill.LAYOUTS → Array<String>   <read-only>

This constant contains an array of possible object layout types as strings.

PixMill.NCSCTab → Object   <read-only>

This object contains a color table of names and color specifications based on the Natural Color System standard.

PixMill.ReseneCTab → Object   <read-only>

This object contains a color table of names and color specifications based on colors provided by the Resene company.

PixMill.STRETCHES → Array<String>   <read-only>

This constant contains an array of possible font stretches as strings.

PixMill.STYLES → Array<String>   <read-only>

This constant contains an array of possible font styles as strings.

PixMill.UNDERLINES → Array<String>   <read-only>

This constant contains an array of possible font underlines as strings.

PixMill.VARIANTS → Array<String>   <read-only>

This constant contains an array of possible font variants as strings.

PixMill.W3CCTab → Object   <read-only>

This object contains a color table of names and color specifications based on the W3C specification.

PixMill.WEIGHTS → Array<String>   <read-only>

This constant contains an array of possible font weights as strings.

Function Details

PixMill.colorToGrayRGBCspec(cspec) → String or Array<Number> or Null

This function converts an RGB specification to the nearest neutral tone color using the NTSC formula.

Parameters:

  • cspec [String or Array<Number>] — the RGB color specification

Returns:

  • [String or Array<Number> or Null] — the neutral tone RGB specification, or null if the input is invalid or unrecognizable

PixMill.convertCMYKACspec(type, cspec) → String or Array<Number> or Null ⇏ ArgumentError

This function converts a valid CMYKA color specification into another one of a specified type.

Parameters:

  • type [String] — the type of color specification to convert to: { 'atstring','integers','floats' }
  • cspec [String or Array<Number>] — the color specification

Returns:

  • [String or Array<Number> or Null] — the new CMYKA color specification, or Null if invalid

Throws:

  • [ArgumentError] — if the color specification type is invalid or unrecognizable

PixMill.convertCMYKACspecToCMYKCspec(cspec) → String or Array<Number> or Null

This function converts a valid CMYKA color specification into an CMYK color specification by removing the trailing alpha value.

Parameters:

  • cspec [String or Array<Number>] — the CMYKA color specification

Returns:

  • [String or Array<Number> or Null] — the new CMYK color specification, or Null if invalid

PixMill.convertCMYKCspec(type, cspec) → String or Array<Number> or Null ⇏ ArgumentError

This function converts a valid CMYK color specification into another one of a specified type.

Parameters:

  • type [String] — the type of color specification to convert to: { 'hashstring','integers','floats' }
  • cspec [String or Array<Number>] — the color specification

Returns:

  • [String or Array<Number> or Null] — the new CMYK color specification, or Null if invalid

Throws:

  • [ArgumentError] — if the color specification type is invalid or unrecognizable

PixMill.convertRGBACspec(type, cspec) → String or Array<Number> or Null ⇏ ArgumentError

This function converts a valid RGBA color specification into another one of a specified type.

Parameters:

  • type [String] — the type of color specification to convert to: { 'atstring','integers','floats' }
  • cspec [String or Array<Number>] — the color specification

Returns:

  • [String or Array<Number> or Null] — the new RGBA color specification, or Null if invalid

Throws:

  • [ArgumentError] — if the color specification type is invalid or unrecognizable

PixMill.convertRGBACspecToRGBCspec(cspec) → String or Array<Number> or Null

This function converts a valid RGBA color specification into an RGB color specification by removing the trailing alpha value.

Parameters:

  • cspec [String or Array<Number>] — the RGBA color specification

Returns:

  • [String or Array<Number> or Null] — the new RGB color specification, or Null if invalid

PixMill.convertRGBCspec(type, cspec) → String or Array<Number> or Null ⇏ ArgumentError

This function converts a valid RGB color specification into another one of a specified type.

Parameters:

  • type [String] — the type of color specification to convert to: { 'hashstring','integers','floats' }
  • cspec [String or Array<Number>] — the color specification

Returns:

  • [String or Array<Number> or Null] — the new RGB color specification, or Null if invalid

Throws:

  • [ArgumentError] — if the color specification type is invalid or unrecognizable

PixMill.extractAlphaFromCMYKACspec(cspec) → String or Number or Null

This function extracts the alpha value from a valid CMYKA color specification. The format of the value depends on the format of the original color specification.

Parameters:

  • cspec [String or Array<Number>] — the CMYKA color specification

Returns:

  • [String or Number or Null] — the Alpha color specification, or Null if invalid

PixMill.extractAlphaFromRGBACspec(cspec) → String or Number or Null

This function extracts the alpha value from a valid RGBA color specification. The format of the value depends on the format of the original color specification.

Parameters:

  • cspec [String or Array<Number>] — the RGBA color specification

Returns:

  • [String or Number or Null] — the Alpha color specification, or Null if invalid

PixMill.isGrayRGBCspec(cspec) → Boolean

This function determines if a given RGB color specification is a neutral (gray) color (R=G=B).

Parameters:

  • cspec [String or Array<Number>] — the RGB color specification

Returns:

  • [Boolean] — true, if the color is gray

PixMill.isValidCMYKACspec(cspec) → Boolean

This function determines if a given color specification is a valid CMYKA specification.

Parameters:

  • cspec [String or Array<Number>] — the color specification

Returns:

  • [Boolean] — true, if the cspec is valid

PixMill.isValidCMYKCspec(cspec) → Boolean

This function determines if a given color specification is a valid CMYK specification.

Parameters:

  • cspec [String or Array<Number>] — the color specification

Returns:

  • [Boolean] — true, if the cspec is valid

PixMill.isValidRGBACspec(cspec) → Boolean

This function determines if a given color specification is a valid RGBA specification.

Parameters:

  • cspec [String or Array<Number>] — the color specification

Returns:

  • [Boolean] — true, if the cspec is valid

PixMill.isValidRGBCspec(cspec) → Boolean

This function determines if a given color specification is a valid RGB specification.

Parameters:

  • cspec [String or Array<Number>] — the color specification

Returns:

  • [Boolean] — true, if the cspec is valid

PixMill.randomGrayRGBCspec(base, range, type) → String or Array<Number> ⇏ ArgumentError

This function creates a random neutral tone (gray) RGB color specification.

Parameters:

  • base [Number] — the minimum intensity value for any of the component values <default: 0>
  • range [Number] — the minimum intensity value for any of the component values <default: 255>
  • type [String] — the type of color specification to create: { 'hashstring','integers','floats' } <default: 'integers'>

Returns:

  • [String or Array<Number>] — the random RGB specification

Throws:

  • [ArgumentError] — if base < 0, range < 0, (base+range)>255

PixMill.randomRGBCspec(base, range, type) → String or Array<Number> ⇏ ArgumentError

This function creates a random RGB color specification.

Parameters:

  • base [Number] — the minimum intensity value for any of the component values <default: 0>
  • range [Number] — the minimum intensity value for any of the component values <default: 255>
  • type [String] — the type of color specification to create: { 'hashstring','integers','floats' } <default: 'integers'>

Returns:

  • [String or Array<Number>] — the random RGB specification

Throws:

  • [ArgumentError] — if base < 0, range < 0, (base+range)>255

PixMill.typeOfCMYKACspec(cspec) → String or Null

This function returns the type of the valid color specification as a string (or null, if invalid). Valid string returns are: { 'atstring','integers','floats' }

Parameters:

  • cspec [String or Array<Number>] — the color specification

Returns:

  • [String or Null] — the type of color specification

PixMill.typeOfCMYKCspec(cspec) → String or Null

This function returns the type of the valid color specification as a string (or null, if invalid). Valid string returns are: { 'hashstring','integers','floats' }

Parameters:

  • cspec [String or Array<Number>] — the color specification

Returns:

  • [String or Null] — the type of color specification

PixMill.typeOfRGBACspec(cspec) → String or Null

This function returns the type of the valid color specification as a string (or null, if invalid). Valid string returns are: { 'atstring','integers','floats' }

Parameters:

  • cspec [String or Array<Number>] — the color specification

Returns:

  • [String or Null] — the type of color specification

PixMill.typeOfRGBCspec(cspec) → String or Null

This function returns the type of the valid color specification as a string (or null, if invalid). Valid string returns are: { 'hashstring','integers','floats' }

Parameters:

  • cspec [String or Array<Number>] — the color specification

Returns:

  • [String or Null] — the type of color specification

Class: PixMill.BoundingBox

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
boundingBox.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class manages all bounding box operations.

The BoundingBox class is used for graphics object layouts. In essence, it's a simple rectangle with some shortcut variables, such as x2,y2 and cx,cy.

Method Registry

Item
Attributes
bottomleft() → Array<Number>
-
bottomright() → Array<Number>
-
center() → Array<Number>
-
move(dx, dy) → PixMill.BoundingBox
-
moveTo(x, y) → PixMill.BoundingBox
-
moved(dx, dy) → PixMill.BoundingBox
-
position() → Array<Number>
-
rect() → Array<Number>
-
resize(dw, dh) → PixMill.BoundingBox ⇏ ArgumentError
-
resizeTo(w, h) → PixMill.BoundingBox ⇏ ArgumentError
-
resized(w, h) → PixMill.BoundingBox ⇏ ArgumentError
-
setFromBox(x, y, x2, y2) → PixMill.BoundingBox ⇏ ArgumentError
-
setFromCxyr(cx, cy, r) → PixMill.BoundingBox ⇏ ArgumentError
-
setFromCxywh(cx, cy, w, h) → PixMill.BoundingBox ⇏ ArgumentError
-
setFromCxyxryr(cx, cy, xr, yr) → PixMill.BoundingBox ⇏ ArgumentError
-
setFromPts(pts) → PixMill.BoundingBox ⇏ ArgumentError
-
setFromXywh(x, y, w, h) → PixMill.BoundingBox ⇏ ArgumentError
-
size() → Array<Number>
-
toArray() → Array<Number>
-
toString() → String
-
topleft() → Array<Number>
-
topright() → Array<Number>
-
xywh() → Array<Number>
-

Method Details

bottomleft() → Array<Number>

This method returns the bottom-left location of the bounding box as a 2-element array.

Returns:

  • [Array<Number>] — the bottom-left location of the bounding box

bottomright() → Array<Number>

This method returns the bottom-right location of the bounding box as a 2-element array.

Returns:

  • [Array<Number>] — the bottom-right location of the bounding box

center() → Array<Number>

This method returns the center location of the bounding box as a 2-element array.

Returns:

  • [Array<Number>] — the center location of the bounding box

move(dx, dy) → PixMill.BoundingBox

This method moves the bounding box to a new location some distance away.

Parameters:

  • dx [Number] — the offset along the x-axis to move
  • dy [Number] — the offset along the y-axis to move

Returns:

  • [PixMill.BoundingBox] — itself

moveTo(x, y) → PixMill.BoundingBox

This method moves the bounding box to a new location.

Parameters:

  • x [Number] — the x-coordinate of the top-left corner
  • y [Number] — the y-coordinate of the top-left corner

Returns:

  • [PixMill.BoundingBox] — itself

moved(dx, dy) → PixMill.BoundingBox

This method creates a new bounding box based on this one, but moved some distance away

Parameters:

  • dx [Number] — the offset along the x-axis to move
  • dy [Number] — the offset along the y-axis to move

Returns:

  • [PixMill.BoundingBox] — a new bounding box based on this box's size, but moved some distance away

position() → Array<Number>

This method returns the bounding box position as a 2-element array.

Returns:

  • [Array<Number>] — the position of the bounding box

rect() → Array<Number>

This method returns the location and size of the bounding box as a 4-element array.

Returns:

  • [Array<Number>] — the location and size of the bounding box

resize(dw, dh) → PixMill.BoundingBox ⇏ ArgumentError

This method resizes the bounding box according to specified deltas.

Parameters:

  • dw [Number] — the difference in width
  • dh [Number] — the difference in height

Returns:

  • [PixMill.BoundingBox] — itself

Throws:

  • [ArgumentError] — if the new calculated width or height is <0

resizeTo(w, h) → PixMill.BoundingBox ⇏ ArgumentError

This method resizes the bounding box.

Parameters:

  • w [Number] — the new width of the bounding box
  • h [Number] — the new height of the bounding box

Returns:

  • [PixMill.BoundingBox] — itself

Throws:

  • [ArgumentError] — if the new calculated width or height is <0

resized(w, h) → PixMill.BoundingBox ⇏ ArgumentError

This method creates a new bounding box at this box's location, but with a different size.

Parameters:

  • w [Number] — the new width
  • h [Number] — the new height

Returns:

  • [PixMill.BoundingBox] — the new bounding box

Throws:

  • [ArgumentError] — if the new calculated width or height is <0

setFromBox(x, y, x2, y2) → PixMill.BoundingBox ⇏ ArgumentError

This method sets the bounding box according to its top-left and bottom-right box positions.

Parameters:

  • x [Number] — the x-coordinate of the top-left corner of the bounding box
  • y [Number] — the y-coordinate of the top-left corner of the bounding box
  • x2 [Number] — the x-coordinate of the bottom-right corner of the bounding box
  • y2 [Number] — the y-coordinate of the bottom-right corner of the bounding box

Returns:

  • [PixMill.BoundingBox] — itself

Throws:

  • [ArgumentError] — if the calculated width or height is <0

setFromCxyr(cx, cy, r) → PixMill.BoundingBox ⇏ ArgumentError

This method sets the bounding box according to its center position and a radius from the center.

Parameters:

  • cx [Number] — the x-coordinate of the center of the bounding box
  • cy [Number] — the y-coordinate of the center of the bounding box
  • r [Number] — a radius from the center point

Returns:

  • [PixMill.BoundingBox] — itself

Throws:

  • [ArgumentError] — if the calculated width or height is <0

setFromCxywh(cx, cy, w, h) → PixMill.BoundingBox ⇏ ArgumentError

This method sets the bounding box according to its center position and its size.

Parameters:

  • cx [Number] — the x-coordinate of the center of the bounding box
  • cy [Number] — the y-coordinate of the center of the bounding box
  • w [Number] — the width of the bounding box
  • h [Number] — the height of the bounding box

Returns:

  • [PixMill.BoundingBox] — itself

Throws:

  • [ArgumentError] — if the width or height is <0

setFromCxyxryr(cx, cy, xr, yr) → PixMill.BoundingBox ⇏ ArgumentError

This method sets the bounding box according to its center position and x-axis and y-axis radii.

Parameters:

  • cx [Number] — the x-coordinate of the center of the bounding box
  • cy [Number] — the y-coordinate of the center of the bounding box
  • xr [Number] — an x-axis radius from the center point
  • yr [Number] — an y-axis radius from the center point

Returns:

  • [PixMill.BoundingBox] — itself

Throws:

  • [ArgumentError] — if the calculated width or height is <0

setFromPts(pts) → PixMill.BoundingBox ⇏ ArgumentError

This method sets the bounding box to a location and size which will contain all of the specified points in the array.

Parameters:

  • pts [Variadic] — the specified points

Returns:

  • [PixMill.BoundingBox] — itself

Throws:

  • [ArgumentError] — if the specified points are invalid or unrecognizable

setFromXywh(x, y, w, h) → PixMill.BoundingBox ⇏ ArgumentError

This method sets the bounding box according to its top-left box position and its size.

Parameters:

  • x [Number] — the x-coordinate of the top-left corner of the bounding box
  • y [Number] — the y-coordinate of the top-left corner of the bounding box
  • w [Number] — the width of the bounding box
  • h [Number] — the height of the bounding box

Returns:

  • [PixMill.BoundingBox] — itself

Throws:

  • [ArgumentError] — if the width or height is <0

size() → Array<Number>

This method returns the bounding box size as a 2-element array.

Returns:

  • [Array<Number>] — the size of the bounding box

toArray() → Array<Number>

This method returns an array representation of the bounding box.

Returns:

  • [Array<Number>] — The array representation of the bounding box

toString() → String

This method returns a string representation of the bounding box.

Returns:

  • [String] — The string representation of the bounding box

topleft() → Array<Number>

This method returns the top-left location of the bounding box as a 2-element array.

Returns:

  • [Array<Number>] — the top-left location of the bounding box

topright() → Array<Number>

This method returns the top-right location of the bounding box as a 2-element array.

Returns:

  • [Array<Number>] — the top-right location of the bounding box

xywh() → Array<Number>

This method returns the location and size of the bounding box as a 4-element array.

Returns:

  • [Array<Number>] — the location and size of the bounding box

Class: PixMill.Canvas

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
canvas.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class manages all canvas operations.

The Canvas class is used for defining and managing the drawing surface and its mapping to its back-end destination.

To Do: Composite Canvases are not supported yet.

Constructor Registry

Item
Attributes
new PixMill.Canvas(width, height, ctab, fill)
-

Property Registry

Item
Attributes
rootbox → PixMill.Rectangle
<read-only>

Method Registry

Item
Attributes
erase() → PixMill.Canvas
-
reset() → PixMill.Canvas
-
setid(id) → PixMill.Canvas
-

Constructor Details

new PixMill.Canvas(width, height, ctab, fill)

This contructor creates the canvas and its underlying JS canvas element based on the given width and height. Initial color settings can also be provided.

Parameters:

  • width [Number] — the width of the drawing surface in pixels
  • height [Number] — the height of the drawing surface in pixels
  • ctab [PixMill.ColorTable] — the initial color table to use with the canvas <default: null>
  • fill [Color] — the initial color to fill the canvas <default: null>

Property Details

rootbox → PixMill.Rectangle   <read-only>

This property defines the base-level drawing surface location and dimension of the canvas.

Method Details

erase() → PixMill.Canvas

This method erases the canvas.

Returns:

  • [PixMill.Canvas] — itself

reset() → PixMill.Canvas

This method erases the canvas and resets the associated graphics state.

Returns:

  • [PixMill.Canvas] — itself

setid(id) → PixMill.Canvas

This method assigns a DOM id to the underlying JS canvas.

Parameters:

  • id [String] — the DOM ID

Returns:

  • [PixMill.Canvas] — itself

Class: PixMill.Circle ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines a circle marking object.

A PixMill.Circle is a circular marking object with full layout and drawing capabilities.

Properties

The circle marking object's property list is a 2-element array:
  • the scale factor, with 0 meaning unscaled
  • a 1-element array containing the circle's radius

Constructor Registry

Item
Attributes
new PixMill.Circle(properties) ⇏ RuntimeError
-

Method Registry

Item
Attributes
place(gs) → PixMill.MarkingObject
<overload>
set(parent, r, scale, gs)
<overload>
trace(gs, force_placement) → PixMill.MarkingObject
<overload>

Constructor Details

new PixMill.Circle(properties) ⇏ RuntimeError

This constructor constructs a circle marking object from the supplied parameters.

Parameters:

  • properties [Object] — the properties of the circle
    • parent [PixMill.MarkingObject] — the parent object which defines the placement reference point
    • r [Number] — the radius of the circle
    • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
    • gs [PixMill.GraphicsState] — the graphics state associated with the circle <default: null>

Throws:

  • [RuntimeError] — if the properties parameter is missing required elements

Method Details

place(gs) → PixMill.MarkingObject   <overload>

This method is used to set the object's layout for tracing and drawing purposes.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(parent, r, scale, gs)   <overload>

This overload method sets the properties of the the Circle marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • r [Number] — the radius of the circle
  • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
  • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

trace(gs, force_placement) → PixMill.MarkingObject   <overload>

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Returns:

  • [PixMill.MarkingObject] — this marking object

Class: PixMill.ColorTable

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
colorTable.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class manages all color table operations.

The ColorTable class is used to manage symbol-to-color specification look-ups.

Constructor Registry

Item
Attributes
new PixMill.ColorTable(source) ⇏ ArgumentError
-

Method Registry

Item
Attributes
delete(key) → PixMill.ColorTable
-
get(key, type) → String or Array<Number> ⇏ RuntimeError
-
getAllHtmlValues() → Hash
-
getClosestCspecKey(target) → String or Null
-
getCspecDifference(key, target) → Integer ⇏ ArgumentError
-
getHtmlSpec(key) → String or Null
-
hasKey(key) → Boolean
-
keys() → Array<String>
-
load(source, on_duplicate_entry) → PixMill.ColorTable ⇏ ArgumentError
-
set(key, cspec, on_duplicate_entry) → PixMill.ColorTable ⇏ ArgumentError ⇏ RuntimeError
-

Constructor Details

new PixMill.ColorTable(source) ⇏ ArgumentError

This constructor creates a new ColorTable from an optional input source.

The Input Source

The constructor's input source can either be a PixMill.ColorTable or a JS Object containing string/color-specification pairs. A null input source will create an empty color table.

Parameters:

  • source [Object or PixMill.ColorTable or Null] — the input source <default: null>

Throws:

  • [ArgumentError] — if the incoming source is invalid or unrecognized

Method Details

delete(key) → PixMill.ColorTable

This method deletes an entry from the color table.

Parameters:

  • key [String] — the color specification key

Returns:

  • [PixMill.ColorTable] — itself

get(key, type) → String or Array<Number> ⇏ RuntimeError

This method is used to retrieve a color specification from the color table. It can also reformat the color specification.

Parameters:

  • key [String] — the color specification key
  • type [String or Null] — the type of color specification to return <default: null>

Returns:

  • [String or Array<Number>] — the color specification

Throws:

  • [RuntimeError] — if the key has not been defined or the type is not compatible with the color specification

getAllHtmlValues() → Hash

This method retruns a table consisting of the loaded color names and HTML specs.

Returns:

  • [Hash] — a table consisting of the loaded color names and HTML specs.

getClosestCspecKey(target) → String or Null

This method finds an entry in the color table which is closest to the specific color specification.

Parameters:

  • target [String or Array<Number>] — the target color specification

Returns:

  • [String or Null] — the key of the color specification closest to the given target, or Null if the color table is empty

getCspecDifference(key, target) → Integer ⇏ ArgumentError

This method calculates the difference between a given named color and the given cspec.

Parameters:

  • key [String] — the color specification key
  • target [String or Array<Number>] — the color specification key

Returns:

  • [Integer] — the difference between the colors

Throws:

  • [ArgumentError] — if the incoming source is invalid or unrecognized

getHtmlSpec(key) → String or Null

This method is used to retrieve the HTML color specification from the color table.

Parameters:

  • key [String] — the color specification key

Returns:

  • [String or Null] — the HTML color specification, or Null if not found

hasKey(key) → Boolean

This method determines if the color table has a specified key defined.

Parameters:

  • key [String] — the color table key

Returns:

  • [Boolean] — true, if the key has been defined

keys() → Array<String>

This method retrieves all of the color table keys.

Returns:

  • [Array<String>] — the list of color table keys

load(source, on_duplicate_entry) → PixMill.ColorTable ⇏ ArgumentError

This method is used to load this color table from an input source.

Parameters:

  • source [Object or PixMill.ColorTable] — the input source
  • on_duplicate_entry [Integer] — the action to take if a duplicate entry is encountered <default: PixMill.CTAB_OVERWRITE>

Returns:

  • [PixMill.ColorTable] — itself

Throws:

  • [ArgumentError] — if on_duplicate_entry = PixMill.CTAB_THROWS and a duplicate entry is encountered

set(key, cspec, on_duplicate_entry) → PixMill.ColorTable ⇏ ArgumentError ⇏ RuntimeError

This method is used to set a color specification to a key. It will also create an HTML-compatible version.

Parameters:

  • key [String] — the color specification key
  • cspec [String or Array<Number>] — the color specification key
  • on_duplicate_entry [Integer] — the action to take if a duplicate entry is encountered <default: PixMill.CTAB_OVERWRITE>

Returns:

  • [PixMill.ColorTable] — itself

Throws:

  • [ArgumentError] — if the color specification is invalid or unrecognized
  • [RuntimeError] — if on_duplicate_entry = PixMill.CTAB_THROWS and a duplicate entry is encountered

Class: PixMill.Ellipse ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines an ellipse marking object.

A PixMill.Ellipse is an elliptical marking object with full layout and drawing capabilities.

Properties

The ellipse marking object's property list is a 2-element array:
  • the scale factor, with 0 meaning unscaled
  • a 2-element array containing the ellipse's x-axis radius and y-axis radius

Constructor Registry

Item
Attributes
new PixMill.Ellipse(properties) ⇏ RuntimeError
-

Method Registry

Item
Attributes
place(gs) → PixMill.MarkingObject
<overload>
set(parent, xr, yr, scale, gs)
<overload>
trace(gs, force_placement) → PixMill.MarkingObject
<overload>

Constructor Details

new PixMill.Ellipse(properties) ⇏ RuntimeError

This constructor constructs a ellipse marking object from the supplied parameters.

Parameters:

  • properties [Object] — the properties of the ellipse
    • parent [PixMill.MarkingObject] — the parent object which defines the placement reference point
    • xr [Number] — the x-axis radius of the ellipse
    • yr [Number] — the y-axis radius of the ellipse
    • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
    • gs [PixMill.GraphicsState] — the graphics state associated with the ellipse <default: null>

Throws:

  • [RuntimeError] — if the properties parameter is missing required elements

Method Details

place(gs) → PixMill.MarkingObject   <overload>

This method is used to set the object's layout for tracing and drawing purposes.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(parent, xr, yr, scale, gs)   <overload>

This overload method sets the properties of the the Ellipse marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • xr [Number] — the x-axis radius of the ellipse
  • yr [Number] — the y-axis radius of the ellipse
  • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
  • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

trace(gs, force_placement) → PixMill.MarkingObject   <overload>

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Returns:

  • [PixMill.MarkingObject] — this marking object

Class: PixMill.GradientPattern

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pattern.jsJavascriptKenneth F. GuerinCopyright © 2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class manages all solid pattern construction and management.

The GradientPattern class is used for defining and managing the drawing surface and characteristics of gradient patterns.

Constructor Registry

Item
Attributes
new PixMill.GradientPattern(type, props)
-

Constructor Details

new PixMill.GradientPattern(type, props)

This contructor creates the solid pattern's underlying canvas based on the given fill color and color table

Parameters:

  • type [String] — the type of gradient pattern
  • props [Hash] — the properties of the gradient pattern

Class: PixMill.Graphic ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines a graphic marking object.

A PixMill.Graphic is an image marking object with full layout and drawing capabilities. The layout capability is tied to the text area's bounding box.

Note: This class used to be called Image, but an Image class definition already exists in the Javascript DOM.

Properties

The graphic marking object's property list is a 2-element array:
  • the scale factor, with 0 meaning unscaled
  • a 1-element array containing the image's surface

Constructor Registry

Item
Attributes
new PixMill.Graphic(properties) ⇏ RuntimeError
-

Method Registry

Item
Attributes
draw(gs) → PixMill.MarkingObject ⇏ RuntimeError
<overload>
place(gs) → PixMill.MarkingObject
<overload>
set(parent, surface, scale, gs)
<overload>
trace(gs, force_placement) ⇏ RuntimeError
<overload>

Constructor Details

new PixMill.Graphic(properties) ⇏ RuntimeError

This constructor constructs a graphic marking object from the supplied parameters.

Parameters:

  • properties [Object] — the properties of the graphic
    • parent [PixMill.MarkingObject] — the parent object which defines the placement reference point
    • surface [CanvasRenderingContext2D] — the surface containing the graphic/image data
    • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
    • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

Throws:

  • [RuntimeError] — if the properties parameter is missing required elements

Method Details

draw(gs) → PixMill.MarkingObject ⇏ RuntimeError   <overload>

This method defines the default marking object drawing.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object drawing

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the layout is not set

place(gs) → PixMill.MarkingObject   <overload>

This method is used to set the object's layout for tracing and drawing purposes.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(parent, surface, scale, gs)   <overload>

This overload method sets the properties of the the Graphic marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • surface [CanvasRenderingContext2D] — the surface containing the graphic/image data
  • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
  • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

trace(gs, force_placement) ⇏ RuntimeError   <overload>

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Throws:

  • [RuntimeError] — always, graphic object cannot be traced

Class: PixMill.GraphicsState

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
graphicsState.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class is used to manage the graphics state for PixMill marking operations.

Constructor Registry

Item
Attributes
new PixMill.GraphicsState(args) ⇏ ArgumentError
-

Method Registry

Item
Attributes
$bezierMinMax() → Object
<private>
$collectPathExtents(x, y, x2, y2) → PixMill.GraphicsState
<private>
$configSource(index, value) → PixMill.GraphicsState
<private>
$extractHtml5Cspec(value) → String
<private>
$fillProc(path) → PixMill.GraphicsState
<private>
$genCanvasBBox(w, h, ctm) → Array<Number>
<private>
$getHeight() → Number
<private>
$getWidth() → Number
<private>
$quadraticMinMax() → Object
<private>
$strokeProc(path, width, loc) → PixMill.GraphicsState
<private>
arc(x, y, radius, startAngle, endAngle, anticlockwise) → PixMill.GraphicsState
-
arcTo() → PixMill.GraphicsState
-
beginPath() → PixMill.GraphicsState
-
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) → PixMill.GraphicsState
-
clipto(preserve) → PixMill.GraphicsState
-
clone(incl_stack) → PixMill.GraphicsState
-
closePath() → PixMill.GraphicsState
-
copyPath() → Path2D
-
ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) → PixMill.GraphicsState
-
getPathExtents() → Array<Number>
-
lineTo(x, y) → PixMill.GraphicsState
-
moveTo(x, y) → PixMill.GraphicsState
-
paint() → PixMill.GraphicsState
-
pathToSvgPath()
-
pop(n) → PixMill.GraphicsState
-
popAll() → PixMill.GraphicsState
-
push(proc) → PixMill.GraphicsState
-
quadraticCurveTo(cpx, cpy, x, y) → PixMill.GraphicsState
-
rect(x, y, w, h) → PixMill.GraphicsState
-
reset() → PixMill.GraphicsState
-
restorePath() → PixMill.GraphicsState
-
rrect(x, y, w, h, xr, yr) → PixMill.GraphicsState
-
savePath() → PixMill.GraphicsState
-
set(options) → PixMill.GraphicsState
-
strokeFill(preserve) → PixMill.GraphicsState
-
unclip() → PixMill.GraphicsState
-

Constructor Details

new PixMill.GraphicsState(args) ⇏ ArgumentError

This constructor will create a graphics state attached to a given drawing context, with an optional color table, or will build a clone of another graphics state.

Parameters:

  • args [Variadic] — a PixMill.GraphicsState to clone or a CanvasRenderingContext2D, PixMill.ColorTable pairing

Throws:

  • [ArgumentError] — if the constructor's arguments are invalid or unrecognizable

Method Details

$bezierMinMax() → Object   <private>

This private method calculates the min & max points for bezier curve extent tracking.

Returns:

  • [Object] — the min and max extent information

$collectPathExtents(x, y, x2, y2) → PixMill.GraphicsState   <private>

This private method manages the extents of the current path by collecting sole and/or min and max points.

Parameters:

  • x [Number] — the x-coordinate of the sole or first point
  • y [Number] — the y-coordinate of the sole or first
  • x2 [Number] — the x-coordinate of the second point <default: null>
  • y2 [Number] — the y-coordinate of the second point <default: null>

Returns:

  • [PixMill.GraphicsState] — this graphics state

$configSource(index, value) → PixMill.GraphicsState   <private>

This private method sets the specified source to a value in a format compatible to the platform's drawing context.

To Do: This implementation is partial, missing support for patterns and shaders (incl. gradient fills)

Parameters:

  • index [String] — the source type to configure
  • value [String or Array<Number>] — the incoming color specification or other source type

Returns:

  • [PixMill.GraphicsState] — this graphics state

$extractHtml5Cspec(value) → String   <private>

This private method retrieves and/or converts a color specification to an HTML5-formatted one.

Parameters:

  • value [String or Array<Number>] — the color specification or color table key

Returns:

  • [String] — an HTML5-formatted color specification

$fillProc(path) → PixMill.GraphicsState   <private>

This private method sets the fill parameters and does a fill operation on the attached drawing context.

Parameters:

  • path [Path2D] — the path that describes the object to fill

Returns:

  • [PixMill.GraphicsState] — this graphics state

$genCanvasBBox(w, h, ctm) → Array<Number>   <private>

This private method generates a 4-element bounding box of the canvas' drawing surface. The current CTM is taken into account when calculating the bounding box, so the canvas may be offset, rotated and/or scaled.

Parameters:

  • w [Number] — the width of the attached canvas
  • h [Number] — the height of the attached canvas
  • ctm [Array<Number>] — the CTM array used for calculations

Returns:

  • [Array<Number>] — the 4-element array of x, y, width, height of the bounding box enclosing the canvas' drawing surface

$getHeight() → Number   <private>

This private method returns the height of the attached canvas.

Returns:

  • [Number] — the height of the canvas

$getWidth() → Number   <private>

This private method returns the width of the attached canvas.

Returns:

  • [Number] — the width of the canvas

$quadraticMinMax() → Object   <private>

This private method calculates the min & max points for quadratic bezier curve extent tracking.

Returns:

  • [Object] — the min and max extent information

$strokeProc(path, width, loc) → PixMill.GraphicsState   <private>

This private method sets the stroke parameters and does a stroke operation on the attached drawing context.

Parameters:

  • path [Path2D] — the path that describes the object to fill
  • width [Number] — the stroke width in pixels
  • loc [Boolean] — true, if the stroke should be clipped to the inside of the object

Returns:

  • [PixMill.GraphicsState] — this graphics state

arc(x, y, radius, startAngle, endAngle, anticlockwise) → PixMill.GraphicsState

This method adds an arc sub-path to the current path.

Parameters:

  • x [Number] — the x-coordinate of the center point of the circle which defines the arc
  • y [Number] — the y-coordinate of the center point of the circle which defines the arc
  • radius [Number] — the radius of the circle which defines the arc
  • startAngle [Number] — the angle defining the location of the start point of the arc, in radians
  • endAngle [Number] — the angle defining the location of the end point of the arc, in radians
  • anticlockwise [Boolean] — true, if the arc is to be drawn anti-/counter-clockwise <default: false>

Returns:

  • [PixMill.GraphicsState] — this graphics state

arcTo() → PixMill.GraphicsState

This method will draw an arc from the

To Do: This method is incomplete with regard to extent tracking.

Returns:

  • [PixMill.GraphicsState] — this graphics state

beginPath() → PixMill.GraphicsState

This method creates a new path.

Returns:

  • [PixMill.GraphicsState] — this graphics state

bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) → PixMill.GraphicsState

This method traces a cubic bezier curve from the current point to a specified point using two control points.

Parameters:

  • cp1x [Number] — the x-coordinate of the first control point
  • cp1y [Number] — the y-coordinate of the first control point
  • cp2x [Number] — the x-coordinate of the second control point
  • cp2y [Number] — the y-coordinate of the second control point
  • x [Number] — the x-coordinate of the end point
  • y [Number] — the y-coordinate of the end point

Returns:

  • [PixMill.GraphicsState] — this graphics state

clipto(preserve) → PixMill.GraphicsState

This method defines a clip region defined by the current path.

Parameters:

  • preserve [Boolean] — true, if the current path is to be preserved <default: false>

Returns:

  • [PixMill.GraphicsState] — this graphics state

clone(incl_stack) → PixMill.GraphicsState

This method clones the current graphics state.

Parameters:

  • incl_stack [Boolean] — true, if the clone includes the graphics state stack <default: false>

Returns:

  • [PixMill.GraphicsState] — this graphics state cloned

closePath() → PixMill.GraphicsState

This method closes the existing path.

Returns:

  • [PixMill.GraphicsState] — this graphics state

copyPath() → Path2D

This method returns a copy of the current path.

Returns:

  • [Path2D] — the copy of the current path

ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) → PixMill.GraphicsState

This method adds an elliptical arc sub-path to the current path.

Parameters:

  • x [Number] — the x-coordinate of the center point of the circle which defines the arc
  • y [Number] — the y-coordinate of the center point of the circle which defines the arc
  • radiusX [Number] — the x-axis radius of the ellipse which defines the arc
  • radiusY [Number] — the y-axis radius of the ellipse which defines the arc
  • rotation [Number] — the tilt of the ellipse, in radians
  • startAngle [Number] — the angle defining the location of the start point of the arc, in radians
  • endAngle [Number] — the angle defining the location of the end point of the arc, in radians
  • anticlockwise [Boolean] — true, if the arc is to be drawn anti-/counter-clockwise <default: false>

Returns:

  • [PixMill.GraphicsState] — this graphics state

getPathExtents() → Array<Number>

This method returns the extents of the current path.

Returns:

  • [Array<Number>] — the 4-element extent array

lineTo(x, y) → PixMill.GraphicsState

This method traces a line from the current point to the given point in the current path.

Parameters:

  • x [Number] — the x-coordinate of the point
  • y [Number] — the y-coordinate of the point

Returns:

  • [PixMill.GraphicsState] — this graphics state

moveTo(x, y) → PixMill.GraphicsState

This method sets the current point in the current path.

Parameters:

  • x [Number] — the x-coordinate of the point
  • y [Number] — the y-coordinate of the point

Returns:

  • [PixMill.GraphicsState] — this graphics state

paint() → PixMill.GraphicsState

This method paints the entire canvas with the current fill source.

Returns:

  • [PixMill.GraphicsState] — this graphics state

pathToSvgPath()

This method converts the current path to an SVG format path description.

pop(n) → PixMill.GraphicsState

This method pops one or more graphics states from the graphics state stack.

Parameters:

  • n [Integer] — the number of graphics states to pop off the stack <default: 1>

Returns:

  • [PixMill.GraphicsState] — this graphics state

popAll() → PixMill.GraphicsState

This method pops the entire GS stack.

Returns:

  • [PixMill.GraphicsState] — this graphics state

push(proc) → PixMill.GraphicsState

This method pushes a new graphics state onto the graphics state stack. The new graphics state is a clone of the current graphics state. If an optional procedure is supplied, the graphics state will be popped after the procedure is run.

Parameters:

  • proc [Function] — the proc to call after the new graphics state is pushed <default: null>

Returns:

  • [PixMill.GraphicsState] — this graphics state

quadraticCurveTo(cpx, cpy, x, y) → PixMill.GraphicsState

This method traces a quadratic bezier curve from the current point to a specified point using a control point.

Parameters:

  • cpx [Number] — the x-coordinate of the control point
  • cpy [Number] — the y-coordinate of the control point
  • x [Number] — the x-coordinate of the end point
  • y [Number] — the y-coordinate of the end point

Returns:

  • [PixMill.GraphicsState] — this graphics state

rect(x, y, w, h) → PixMill.GraphicsState

This method adds a rectangular sub-path to the current path.

Parameters:

  • x [Number] — the x-coordinate of the top-left position of the rectangle
  • y [Number] — the y-coordinate of the top-left position of the rectangle
  • w [Number] — the width of the rectangle
  • h [Number] — the height of the rectangle

Returns:

  • [PixMill.GraphicsState] — this graphics state

reset() → PixMill.GraphicsState

This method resets a graphics state to its initial state.

Returns:

  • [PixMill.GraphicsState] — this graphics state

restorePath() → PixMill.GraphicsState

This method restores the current saved path and state.

Returns:

  • [PixMill.GraphicsState] — this graphics state

rrect(x, y, w, h, xr, yr) → PixMill.GraphicsState

This method adds a rounded rectangular sub-path to the current path.

Parameters:

  • x [Number] — the x-coordinate of the top-left position of the rectangle
  • y [Number] — the y-coordinate of the top-left position of the rectangle
  • w [Number] — the width of the rectangle
  • h [Number] — the height of the rectangle
  • xr [Number] — the x-axis radius of the corners of the rectangle
  • yr [Number] — the y-axis radius of the corners of the rectangle

Returns:

  • [PixMill.GraphicsState] — this graphics state

savePath() → PixMill.GraphicsState

This method saves the current path and state. There is no stack.

Returns:

  • [PixMill.GraphicsState] — this graphics state

set(options) → PixMill.GraphicsState

This method sets graphics state settings and properties.

Parameters:

  • options [Object] — an object of key/value pairs containing the graphics state settings to set

Returns:

  • [PixMill.GraphicsState] — this graphics state

strokeFill(preserve) → PixMill.GraphicsState

This method does a combined fill and/or stroke operation along the current path.

Parameters:

  • preserve [Boolean] — will reset the path if false <default: false>

Returns:

  • [PixMill.GraphicsState] — this graphics state

unclip() → PixMill.GraphicsState

This method removes the topmost clip region from the clip stack.

Returns:

  • [PixMill.GraphicsState] — this graphics state

Class: PixMill.Hexagon ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines a hexagon marking object.

A PixMill.Hexagon is a hexagonal marking object with full layout and drawing capabilities.

Properties

The hexagon marking object's property list is a 2-element array:
  • the scale factor, with 0 meaning unscaled
  • a 2-element array containing the hexagon's edge-to-edge size and orientation

Constructor Registry

Item
Attributes
new PixMill.Hexagon(properties) ⇏ RuntimeError
-

Method Registry

Item
Attributes
place(gs) → PixMill.MarkingObject
<overload>
set(parent, size, orientation, scale, gs)
<overload>
trace(gs, force_placement) → PixMill.MarkingObject
<overload>

Constructor Details

new PixMill.Hexagon(properties) ⇏ RuntimeError

This constructor constructs a hexagon marking object from the supplied parameters.

Parameters:

  • properties [Object] — the properties of the hexagon
    • parent [PixMill.MarkingObject] — the parent object which defines the placement reference point
    • size [Number] — the edge-to-edge size of the hexagon
    • orientation [String] — the orientation of the hexagon <default: 'wide'>
    • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
    • gs [PixMill.GraphicsState] — the graphics state associated with the hexagon <default: null>

Throws:

  • [RuntimeError] — if the properties parameter is missing required elements

Method Details

place(gs) → PixMill.MarkingObject   <overload>

This method is used to set the object's layout for tracing and drawing purposes.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(parent, size, orientation, scale, gs)   <overload>

This overload method sets the properties of the the Hexagon marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • size [Number] — the edge-to-edge size of the hexagon
  • orientation [String] — the orientation of the hexagon <default: 'wide'>
  • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
  • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

trace(gs, force_placement) → PixMill.MarkingObject   <overload>

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Returns:

  • [PixMill.MarkingObject] — this marking object

Class: PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class contains common code and defines a common API for all PixMill marking objects.

This PixMill.MarkingObject is a combination layout and drawing object manager. All marking objects can be drawn and can also be used as a layout parent, via its bbox (or bounding box).

Place, Trace, Draw

The place, trace and draw API is used to manage the placement of the object, to trace its shape (thereby defining its bbox) and draw it. The API is designed such that each derived object can override the default functionality as defined within the base MarkingObject class.

A fourth, quiet, member of the API is cliptrace, a function used to trace the object for clip region management purposes.

Constructor Registry

Item
Attributes
new PixMill.MarkingObject()
-

Method Registry

Item
Attributes
$calcDim(scale, value) → Number
<private> <deprecate>
$parentIsBase() → Boolean
<private>
$parentIsViewport() → Boolean
<private>
bbox() → PixMill.BoundingBox
-
clipto(gs) → PixMill.MarkingObject
-
cliptrace(gs, force_placement) → PixMill.MarkingObject ⇏ RuntimeError
-
draw(gs, eproc) → PixMill.MarkingObject ⇏ RuntimeError
-
place(gs) → PixMill.MarkingObject
-
set(type, parent) → PixMill.MarkingObject
-
setHexagonLayout(gs, ee, orientation) → PixMill.MarkingObject ⇏ RuntimeError
<protected>
setImageLayout(gs, surface) → PixMill.MarkingObject ⇏ RuntimeError
<protected>
setPolyLayout(gs, minmax) → PixMill.MarkingObject ⇏ RuntimeError
<protected>
setRadiiLayout(gs, xr, yr) → PixMill.MarkingObject ⇏ RuntimeError
<protected>
setTextLayout(gs, width, height) → PixMill.MarkingObject ⇏ RuntimeError
<protected>
setWhLayout(gs, w, h) → PixMill.MarkingObject ⇏ RuntimeError
<protected>
trace(gs, force_placement) → PixMill.MarkingObject ⇏ RuntimeError
-
unclip(gs) → PixMill.MarkingObject
-
update(props) → PixMill.MarkingObject
-
viewport() → PixMill.Viewport
-

Constructor Details

new PixMill.MarkingObject()

The constructor is a no-op. The derived classes provide the functionality.

Method Details

$calcDim(scale, value) → Number   <private> <deprecate>

This private method calculates a dimension value of the object based on the specified scale.

Parameters:

  • scale [Number] — the scale factor
  • value [Number] — the value to adjust

Returns:

  • [Number] — the scaled value

$parentIsBase() → Boolean   <private>

Returns:

  • [Boolean] — true if the parent is a drawing surface

$parentIsViewport() → Boolean   <private>

Returns:

  • [Boolean] — true if the parent is a PixMill.Viewport

bbox() → PixMill.BoundingBox

This method returns the marking object's bbox (bounding box).

Note: Some layouts may be arrays, in which case the first array is the primary bounding box.

Returns:

  • [PixMill.BoundingBox] — the marking object's bounding box

clipto(gs) → PixMill.MarkingObject

This method sets the underlying graphics state's clip region to the marking object's shape.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to set the clip region

Returns:

  • [PixMill.MarkingObject] — this marking object

cliptrace(gs, force_placement) → PixMill.MarkingObject ⇏ RuntimeError

This method defines the default marking object shape tracing logic for clip region creation, aka path creation. For clip region creation, some derived objects may use its bbox as its clip region shape.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if there the marking object does not have a valid layout

draw(gs, eproc) → PixMill.MarkingObject ⇏ RuntimeError

This method defines the default marking object drawing.

Note: Most of the time, the derived object don't need to override this behavior. Most of the time...

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object drawing
  • eproc [Function] — a function to call if the trace API call has thrown an exception <default: null>

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the trace call threw an uncaught exception

place(gs) → PixMill.MarkingObject

This method is used to set the object's layout for tracing and drawing purposes. As the base class is essentially a null object, there is no layout.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(type, parent) → PixMill.MarkingObject

This method sets the common properties of all marking objects. Each derived class will define the types of each property and interact with them.

Parameters:

  • type [String] — the name of the type of the derived marking object
  • parent [PixMill.MarkingObject or PixMill.GraphicsState] — the

Returns:

  • [PixMill.MarkingObject] — this marking object

setHexagonLayout(gs, ee, orientation) → PixMill.MarkingObject ⇏ RuntimeError   <protected>

This protected method is designed to place a hexagonal marking object onto a drawing context using graphics state parameters.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used to place the object
  • ee [Number] — the edge-to-edge size of the hexagon
  • orientation [String] — the orientation of the hexagon as a string: { 'wide', 'tall' } <default: 'wide'>

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the marking object is a PixMill.Viewport and x,y positioning or scaling is specified

setImageLayout(gs, surface) → PixMill.MarkingObject ⇏ RuntimeError   <protected>

This protected method is designed to place an image marking object onto a drawing context using graphics state parameters.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used to place the object
  • surface [Image] — the image surface to be placed

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the marking object is a PixMill.Viewport and x,y positioning or scaling is specified

setPolyLayout(gs, minmax) → PixMill.MarkingObject ⇏ RuntimeError   <protected>

This protected method is designed to place a polygon marking object onto a drawing context using graphics state parameters.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used to place the object
  • minmax [Array<Number>] — a 4-element array of xy-minmax values that define the bounds of the effective area of the polygon

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the marking object is a PixMill.Viewport and x,y positioning or scaling is specified

setRadiiLayout(gs, xr, yr) → PixMill.MarkingObject ⇏ RuntimeError   <protected>

This protected method is designed to place a circular/elliptical marking object onto a drawing context using graphics state parameters.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used to place the object
  • xr [Number] — the radius of a circular object or the x-axis radius of an elliptical object
  • yr [Number] — the y-axis radius of an elliptical object, should be equal to xr for a circular object <default: xr>

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the marking object is a PixMill.Viewport and x,y positioning or scaling is specified

setTextLayout(gs, width, height) → PixMill.MarkingObject ⇏ RuntimeError   <protected>

This protected method is designed to place a text marking object onto a drawing context using graphics state parameters. The width and height parameters are non-rotated parameters. If the graphics state specifies any rotation or scaling, the appropriate values will be calculated.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used to place the object
  • width [Number] — the width of the string
  • height [Number] — the heighth of the string

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the marking object is a PixMill.Viewport and x,y positioning or scaling is specified

setWhLayout(gs, w, h) → PixMill.MarkingObject ⇏ RuntimeError   <protected>

This protected method is designed to place a rectangular marking object onto a drawing context using graphics state parameters.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used to place the object
  • w [Number] — the width of the rectangular object
  • h [Number] — the height of the rectangular object

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the marking object is a PixMill.Viewport and x,y positioning or scaling is specified

trace(gs, force_placement) → PixMill.MarkingObject ⇏ RuntimeError

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Note: Due to how Javascript class inheritance works, while this method is defined within PixMill.MarkingObject, 'this' may be referring to a derived (real) object, so this.place() will call the correct method.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if there the marking object does not have a valid layout

unclip(gs) → PixMill.MarkingObject

This method resets the underlying graphics state's clip region.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state

Returns:

  • [PixMill.MarkingObject] — this marking object

update(props) → PixMill.MarkingObject

This method updates the property values for the marking object.

Parameters:

  • props [Array] — The properties to assign to the marking object

Returns:

  • [PixMill.MarkingObject] — this marking object

viewport() → PixMill.Viewport

This method returns the marking object's viewport.

Returns:

  • [PixMill.Viewport] — the marking object's viewport, or itself

Class: PixMill.Path ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines a path marking object.

A PixMill.Path is a path marking object with full layout and drawing capabilities.

Properties

The path marking object's property list is a 2-element array:
  • the scale factor, with 0 meaning unscaled
  • a 3-element array containing:
    • the path's string description
    • the path's PathDescriptor
    • a 2-element array of path extents (set during place())

Constructor Registry

Item
Attributes
new PixMill.Path(properties) ⇏ RuntimeError
-

Method Registry

Item
Attributes
place(gs) → PixMill.MarkingObject
<overload>
set(parent, desc, scale, gs)
<overload>
trace(gs, force_placement) → PixMill.MarkingObject
<overload>

Constructor Details

new PixMill.Path(properties) ⇏ RuntimeError

This constructor constructs a path marking object from the supplied parameters.

Parameters:

  • properties [Object] — the properties of the path
    • parent [PixMill.MarkingObject] — the parent object which defines the placement reference point
    • desc [String] — the path description
    • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
    • gs [PixMill.GraphicsState] — the graphics state associated with the path <default: null>

Throws:

  • [RuntimeError] — if the properties parameter is missing required elements

Method Details

place(gs) → PixMill.MarkingObject   <overload>

This method is used to set the object's layout for tracing and drawing purposes.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(parent, desc, scale, gs)   <overload>

This overload method sets the properties of the the Path marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • desc [String] — the path description
  • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
  • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

trace(gs, force_placement) → PixMill.MarkingObject   <overload>

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Returns:

  • [PixMill.MarkingObject] — this marking object

Class: PixMill.PathDescriptor

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pathDescriptor.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class tokenizes an SVG-style path description.

Constructor Registry

Item
Attributes
new PixMill.PathDescriptor(desc)
-

Method Registry

Item
Attributes
$compile() → Boolean
<private>
anyTokens() → Boolean
-
set(desc) → Boolean
-
trace(gs, absx, absy, relx, rely)
-

Constructor Details

new PixMill.PathDescriptor(desc)

This constructor tokenizes the given path description for analysis or rendering.

Parameters:

  • desc [String] — the path description

Method Details

$compile() → Boolean   <private>

This private method tokenizes the path descriptor string.

Returns:

  • [Boolean] — true, if successful

anyTokens() → Boolean

This method determines if any tokens have been defined.

Returns:

  • [Boolean] — true, if there are tokens

set(desc) → Boolean

This method tokenizes the given patah description.

Parameters:

  • desc [String] — the path description

Returns:

  • [Boolean] — true, if any tokens have been parsed successfully

trace(gs, absx, absy, relx, rely)

This method draws the tokenized information using the given graphics state.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state
  • absx [Function] — the function to call to compute an absolute x-coordinate value <default: (x) => { return x }>
  • absy [Function] — the function to call to compute an absolute y-coordinate value <default: (y) => { return y }>
  • relx [Function] — the function to call to compute a relative x-coordinate value <default: (rx) => { return rx }>
  • rely [Function] — the function to call to compute a relative y-coordinate value <default: (ry) => { return ry }>

Class: PixMill.Pattern

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pattern.jsJavascriptKenneth F. GuerinCopyright © 2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class manages all pattern operations.

The Pattern class is used for defining and managing all PixMill pattern types.

Constructor Registry

Item
Attributes
new PixMill.Pattern(options)
-

Method Registry

Item
Attributes
$getPathAnchorInfo(gs) → Array<Number>
<private>

Constructor Details

new PixMill.Pattern(options)

This contructor creates a pattern based on the input parameters.

Parameters:

  • options [Hash] — the pattern initialization data

Method Details

$getPathAnchorInfo(gs) → Array<Number>   <private>

This private method gets the pattern offsets required for anchored positioning.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state containing the current path extents

Returns:

  • [Array<Number>] — the coordinate to anchor the pattern to as its origin

Class: PixMill.Polygon ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines a polygon marking object.

A PixMill.Polygon is a polygonal marking object with full layout and drawing capabilities.

Properties

The polygon marking object's property list is a 2-element array:
  • the scale factor, with 0 meaning unscaled
  • a 4-element array containing:
    • the polygon's open or closed state
    • the size of the point array defining the polygon
    • the array of points defining the polygon
    • an array of translated points defining the polygon after placement (set during place())

Constructor Registry

Item
Attributes
new PixMill.Polygon(properties) ⇏ RuntimeError
-

Method Registry

Item
Attributes
place(gs) → PixMill.MarkingObject
<overload>
set(parent, points, closed, scale, gs)
<overload>
trace(gs, force_placement) → PixMill.MarkingObject
<overload>

Constructor Details

new PixMill.Polygon(properties) ⇏ RuntimeError

This constructor constructs a polygon marking object from the supplied parameters.

Parameters:

  • properties [Object] — the properties of the polygon
    • parent [PixMill.MarkingObject] — the parent object which defines the placement reference point
    • points [Array<Number>] — the points of the polygon as a single-dimension Array of coordinates
    • closed [Boolean] — true, if the polygon path is closed <default: true>
    • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
    • gs [PixMill.GraphicsState] — the graphics state associated with the polygon <default: null>

Throws:

  • [RuntimeError] — if the properties parameter is missing required elements

Method Details

place(gs) → PixMill.MarkingObject   <overload>

This method is used to set the object's layout for tracing and drawing purposes.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(parent, points, closed, scale, gs)   <overload>

This overload method sets the properties of the the Polygon marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • points [Array<Number>] — the points of the polygon as a single-dimension Array of coordinates
  • closed [Boolean] — true, if the polygon path is closed <default: true>
  • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
  • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

trace(gs, force_placement) → PixMill.MarkingObject   <overload>

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Returns:

  • [PixMill.MarkingObject] — this marking object

Class: PixMill.Rectangle ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines a rectangle marking object.

A PixMill.Rectangle is a rectangular marking object with full layout and drawing capabilities. This marking object also supports rounded rectangles as well.

Properties

The rectangle marking object's property list is a 2-element array:
  • the scale factor, with 0 meaning unscaled
  • a 4-element array containing the rectangle parameters: width, height, x-axis corner radius, y-axis corner radius

Constructor Registry

Item
Attributes
new PixMill.Rectangle(properties) ⇏ RuntimeError
-

Method Registry

Item
Attributes
place(gs) → PixMill.MarkingObject
<overload>
set(parent, w, h, xr, yr, scale, gs)
<overload>
trace(gs, force_placement) → PixMill.MarkingObject
<overload>

Constructor Details

new PixMill.Rectangle(properties) ⇏ RuntimeError

This constructor constructs a rectangle marking object from the supplied parameters.

Parameters:

  • properties [Object] — the properties of the rectangle
    • parent [PixMill.MarkingObject] — the parent object which defines the placement reference point
    • w [Number] — the width of the rectangle
    • h [Number] — the height of the rectangle
    • xr [Number] — the x-axis radius of the corners of a rounded rectangle, if specified <default: null>
    • yr [Number] — the y-axis radius of the corners of a rounded rectangle, if specified <default: null>
    • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
    • gs [PixMill.GraphicsState] — the graphics state associated with the rectangle <default: null>

Throws:

  • [RuntimeError] — if the properties parameter is missing required elements

Method Details

place(gs) → PixMill.MarkingObject   <overload>

This method is used to set the object's layout for tracing and drawing purposes.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(parent, w, h, xr, yr, scale, gs)   <overload>

This overload method sets the properties of the the Rectangle marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • w [Number] — the width of the rectangle
  • h [Number] — the height of the rectangle
  • xr [Number] — the x-axis radius of the corners of a rounded rectangle, if specified <default: null>
  • yr [Number] — the y-axis radius of the corners of a rounded rectangle, if specified <default: null>
  • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
  • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

trace(gs, force_placement) → PixMill.MarkingObject   <overload>

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Returns:

  • [PixMill.MarkingObject] — this marking object

Class: PixMill.SolidPattern

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pattern.jsJavascriptKenneth F. GuerinCopyright © 2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class manages all solid pattern construction and management.

The SolidPattern class is used for defining and managing the drawing surface and characteristics of solid color patterns.

Constructor Registry

Item
Attributes
new PixMill.SolidPattern(cspec)
-

Constructor Details

new PixMill.SolidPattern(cspec)

This contructor creates the solid pattern's underlying canvas based on the given fill color and color table

Parameters:

  • cspec [Color] — the initial color to fill the pattern

Class: PixMill.SurfacePattern

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pattern.jsJavascriptKenneth F. GuerinCopyright © 2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class manages all surface pattern construction and management.

The SurfacePattern class is used for defining and managing the drawing surface and characteristics of surface patterns. Surface patterns are drawable and their boundaries are set via the given starting graphic and/or width,height parameters.

Constructor Registry

Item
Attributes
new PixMill.SurfacePattern(surface, width, height, ctab, fill)
-

Constructor Details

new PixMill.SurfacePattern(surface, width, height, ctab, fill)

This contructor creates the surface pattern's underlying canvas based on the given parameters

Parameters:

  • surface [PixMill.Canvas or HTMLImageElement or HTMLCanvasElement or Function] — the initial graphic to copy into, if a function it will build the graphic dynamically
  • width [Integer] — the width of the pattern, or the width of the initial graphic if 0 <default: 0>
  • height [Integer] — the height of the pattern, or the width of the initial graphic if 0 <default: 0>
  • ctab [PixMill.ColorTable] — the initial color table to use with the pattern <default: null>
  • fill [Color] — the initial color to fill the canvas <default: null>

Class: PixMill.Text ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines a text marking object.

A PixMill.Text is a text marking object with full layout and drawing capabilities. The layout capability is tied to the text area's bounding box.

Properties

The text marking object's property list is a 2-element array:
  • the scale factor, with 0 meaning unscaled
  • a 7-element array containing:
    • the character string of the text object
    • the scale factor applied to the font
    • a boolean denoting whether the text object will "snap to ink"
    • an optional text attribute list to apply to the string
    • the font specification used after the font scaling was applied (set during place())
    • the font properties applied after possible autofitting (set during place())
    • text drawing parameters (set during place())

Constructor Registry

Item
Attributes
new PixMill.Text(properties) ⇏ RuntimeError
-

Method Registry

Item
Attributes
cliptrace(gs)
<overload>
draw(gs) → PixMill.MarkingObject ⇏ RuntimeError
<overload>
place(gs) → PixMill.MarkingObject
<overload>
set(parent, string, fontscale, snap_to_ink, attribute_list, scale, gs)
<overload>
trace(gs, force_placement) ⇏ RuntimeError
<overload>

Constructor Details

new PixMill.Text(properties) ⇏ RuntimeError

This constructor constructs a text marking object from the supplied parameters.

Parameters:

  • properties [Object] — the properties of the text
    • parent [PixMill.MarkingObject] — the parent object which defines the placement reference point
    • string [String] — the text string
    • fontscale [Integer] — the scale factor for the font <default: 0>
    • snap_to_ink [Boolean] — true, if the bounding box of the marking object will be reduced to the area inked <default: false>
    • attribute_list [PixMill.TextAttributes] — attributes to apply to the text string <default: null>
    • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
    • gs [PixMill.GraphicsState] — the graphics state associated with the text <default: null>

Throws:

  • [RuntimeError] — if the properties parameter is missing required elements

Method Details

cliptrace(gs)   <overload>

This method defines the default marking object shape tracing logic for clip region creation, aka path creation.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to set the clip region

draw(gs) → PixMill.MarkingObject ⇏ RuntimeError   <overload>

This method defines the default marking object drawing.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object drawing

Returns:

  • [PixMill.MarkingObject] — this marking object

Throws:

  • [RuntimeError] — if the layout is not set

place(gs) → PixMill.MarkingObject   <overload>

This method is used to set the object's layout for tracing and drawing purposes.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state used for object placement

Returns:

  • [PixMill.MarkingObject] — this marking object

set(parent, string, fontscale, snap_to_ink, attribute_list, scale, gs)   <overload>

This overload method sets the properties of the the Text marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • string [String] — the text string
  • fontscale [Integer] — the scale factor for the font <default: 0>
  • snap_to_ink [Boolean] — true, if the bounding box of the marking object will be reduced to the area inked <default: false>
  • attribute_list [PixMill.TextAttributes] — attributes to apply to the text string <default: null>
  • scale [Integer] — the scale factor that defines the coordinate system coverage of the parent <default: 0>
  • gs [PixMill.GraphicsState] — the graphics state associated with the graphic <default: null>

trace(gs, force_placement) ⇏ RuntimeError   <overload>

This method defines the default marking object shape tracing logic, aka path creation. It requires a layout to be set via the place API call.

Parameters:

  • gs [PixMill.GraphicsState] — the graphics state to use for object shape tracing
  • force_placement [Boolean] — true, if the caller wants to force/overwrite a new placement layout <default: false>

Throws:

  • [RuntimeError] — always, text object cannot be traced

Class: PixMill.TextAttributes

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
textAttributes.jsJavascriptKenneth F. GuerinCopyright © 2018-2024, Brick Mill Games, LLC, all rights reserved.

Overview

This class manages layout and drawing attributes for runs of characters within a text string.

Constructor Registry

Item
Attributes
new PixMill.TextAttributes(attrs)
-

Property Registry

Item
Attributes
anyDrawingAttributes → Boolean
<read-only>
anyLayoutAttributes → Boolean
<read-only>
anyUnderlineAttributes → Boolean
<read-only>
length → Integer
<read-only>

Method Registry

Item
Attributes
$addToDrawingAttributes(name, value, si, ei) → PixMill.TextAttributes
<private>
$addToLayoutAttributes(name, value, si, ei) → PixMill.TextAttributes
<private>
addBackground(value, si, ei) → PixMill.TextAttributes
-
addFill(value, si, ei) → PixMill.TextAttributes
-
addFontRelSize(value, si, ei) → PixMill.TextAttributes
-
addFontStyle(value, si, ei) → PixMill.TextAttributes
-
addFontVariant(value, si, ei) → PixMill.TextAttributes
-
addRise(value, si, ei) → PixMill.TextAttributes
-
addStretch(value, si, ei) → PixMill.TextAttributes
-
addStrikethrough(value, si, ei) → PixMill.TextAttributes
-
addStrikethroughColor(value, si, ei) → PixMill.TextAttributes
-
addStroke(value, si, ei) → PixMill.TextAttributes
-
addStrokeWidth(value, si, ei) → PixMill.TextAttributes
-
addSubscript(value, si, ei) → PixMill.TextAttributes
-
addSuperscript(value, si, ei) → PixMill.TextAttributes
-
addUnderline(value, si, ei) → PixMill.TextAttributes
-
addUnderlineColor(value, si, ei) → PixMill.TextAttributes
-
addWeight(value, si, ei) → PixMill.TextAttributes
-
collectDrawingAttributes(si, ei) → Object
-
eachBackgroundLayoutAttribute(callback)
-
eachDrawingAttribute(callback)
-
eachLayoutAttribute(callback)
-
eachSpecificDrawingAttribute(attribute, callback)
-
eachSpecificLayoutAttribute(attribute, callback)
-
eachUnderlineLayoutAttribute(callback)
-

Constructor Details

new PixMill.TextAttributes(attrs)

This constructor creates a PixMill.TextAttributes object w/o any attributes defined.

Parameters:

  • attrs [PixMill.TextAttributes] — a set of text attributes to clone <default: null>

Property Details

anyDrawingAttributes → Boolean   <read-only>

This property returns true if any drawing attributes have been defined

anyLayoutAttributes → Boolean   <read-only>

This property returns true if any layout attributes have been defined

anyUnderlineAttributes → Boolean   <read-only>

This property returns true if any underline attributes have been defined

length → Integer   <read-only>

This property returns the number of attributes defined

Method Details

$addToDrawingAttributes(name, value, si, ei) → PixMill.TextAttributes   <private>

Parameters:

  • name [String] — The name of the attribute
  • value [Any] — The value of the attribute
  • si [Integer] — the starting index of the range to cover
  • ei [Integer] — the ending index of the range to cover

Returns:

  • [PixMill.TextAttributes] — itself

$addToLayoutAttributes(name, value, si, ei) → PixMill.TextAttributes   <private>

Parameters:

  • name [String] — The name of the attribute
  • value [Any] — The value of the attribute
  • si [Integer] — the starting index of the range to cover
  • ei [Integer] — the ending index of the range to cover

Returns:

  • [PixMill.TextAttributes] — itself

addBackground(value, si, ei) → PixMill.TextAttributes

This method adds a background color attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Color] — The background color to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addFill(value, si, ei) → PixMill.TextAttributes

This method adds a fill attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Color] — The fill color to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addFontRelSize(value, si, ei) → PixMill.TextAttributes

This method adds a font relative size attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Number] — The relative size of the font
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addFontStyle(value, si, ei) → PixMill.TextAttributes

This method adds a font style attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [PixMill.STYLES] — The font style to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addFontVariant(value, si, ei) → PixMill.TextAttributes

This method adds a font variant attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [PixMill.VARIANTS] — The font variant to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addRise(value, si, ei) → PixMill.TextAttributes

This method adds a font rise attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Number] — The distance to rise the font glyphs
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addStretch(value, si, ei) → PixMill.TextAttributes

This method adds a font stretch attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [PixMill.STRETCHES] — The font stretch to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addStrikethrough(value, si, ei) → PixMill.TextAttributes

This method adds a font strikethrough, which can optionally only apply to a range of the text.

Parameters:

  • value [Null] — Unused
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addStrikethroughColor(value, si, ei) → PixMill.TextAttributes

This method adds a strikethrough color attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Color] — The strikethrough color to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addStroke(value, si, ei) → PixMill.TextAttributes

This method adds a stroke attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Color] — The stroke color to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addStrokeWidth(value, si, ei) → PixMill.TextAttributes

This method adds a stroke width attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Number] — The stroke width to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addSubscript(value, si, ei) → PixMill.TextAttributes

This method adds a font subscript attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Null] — Unused
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addSuperscript(value, si, ei) → PixMill.TextAttributes

This method adds a font superscript attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Null] — Unused
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addUnderline(value, si, ei) → PixMill.TextAttributes

This method adds a font underline, which can optionally only apply to a range of the text.

Parameters:

  • value [PixMill.UNDERLINES] — The font underline to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addUnderlineColor(value, si, ei) → PixMill.TextAttributes

This method adds a underline color attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [Color] — The underline color to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

addWeight(value, si, ei) → PixMill.TextAttributes

This method adds a font weight attribute, which can optionally only apply to a range of the text.

Parameters:

  • value [PixMill.WEIGHTS] — The font weight to use
  • si [Integer] — the starting index of the range to cover <default: null>
  • ei [Integer] — the ending index of the range to cover <default: null>

Returns:

  • [PixMill.TextAttributes] — itself

collectDrawingAttributes(si, ei) → Object

This method collects the set of drawing attributes that apply to a given range.

Parameters:

  • si [Integer] — the starting index of the range <default: null>
  • ei [Integer] — the ending index of the range <default: null>

Returns:

  • [Object] — the collection of drawing attributes

eachBackgroundLayoutAttribute(callback)

This method calls a callback function for each background drawing attribute.

Parameters:

  • callback [Function] — the function to call for each background attribute

eachDrawingAttribute(callback)

This method calls a callback function for each defined drawing attribute.

Parameters:

  • callback [Function] — the function to call for each drawing attribute

eachLayoutAttribute(callback)

This method calls a callback function for each defined layout attribute.

Parameters:

  • callback [Function] — the function to call for each layout attribute

eachSpecificDrawingAttribute(attribute, callback)

This method calls a callback function for each specific drawing attribute.

Parameters:

  • attribute [String] — the specific attribute
  • callback [Function] — the function to call for each drawing attribute

eachSpecificLayoutAttribute(attribute, callback)

This method calls a callback function for each specific layout attribute.

Parameters:

  • attribute [String] — the specific attribute
  • callback [Function] — the function to call for each layout attribute

eachUnderlineLayoutAttribute(callback)

This method calls a callback function for each underline layout attribute.

Parameters:

  • callback [Function] — the function to call for each underline layout attribute

Class: PixMill.Viewport ← PixMill.MarkingObject

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
markingObjects.jsJavascriptKenneth F. GuerinCopyright © 2018-2025, Brick Mill Games, LLC, all rights reserved.

Overview

This class defines a viewport onto a PixMill.Canvas.

A PixMill.Viewport is primarily a layout object which sits directly on top of the underlying PixMill.Canvas' drawing context. It differs from a Canvas' rootbox in that it can have a graphics state applied. This allows for scaling and other positioning properties to be applied just prior to interactions with the drawing context.

Properties

The viewport marking object's property list is a 1-element array consisting of a zero-size bounding box at the specified origin point. This zero-size bounding box means no space for marking operations... ie: a viewport is not markable.

Constructor Registry

Item
Attributes
new PixMill.Viewport(parent, x, y)
-

Method Registry

Item
Attributes
bbox() → PixMill.BoundingBox
<overload>
set(parent, x, y) → PixMill.Viewport ⇏ RuntimeError
<overload>

Constructor Details

new PixMill.Viewport(parent, x, y)

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • x [Number] — the x-coordinate of the origin point of the viewport within the underlying drawing context <default: 0>
  • y [Number] — the y-coordinate of the origin point of the viewport within the underlying drawing context <default: 0>

Method Details

bbox() → PixMill.BoundingBox   <overload>

This overload function returns the viewport's bounding box defined in its property list.

Returns:

  • [PixMill.BoundingBox] — the viewport's bounding box

set(parent, x, y) → PixMill.Viewport ⇏ RuntimeError   <overload>

This overload method sets the properties of the the Viewport marking object.

Parameters:

  • parent [DrawingContext] — the underlying drawing context, which is a CanvasRenderingContext2D in this Javascript port
  • x [Number] — the x-coordinate of the origin point of the viewport within the underlying drawing context <default: 0>
  • y [Number] — the y-coordinate of the origin point of the viewport within the underlying drawing context <default: 0>

Returns:

  • [PixMill.Viewport] — this viewport

Throws:

  • [RuntimeError] — if the drawing context is not of an appropriate type (CanvasRenderingContext2D)

This documentation page was generated by the Codoc gem on 04-Nov-2025 at 12:06:33.
Library Documentation Page
The WebFX Javascript Application UI Toolkit
Overview
DragEventObserver (class)
MouseEventObserver (class)
WebFX (namespace)
WebFX.AccordionPane ( ⟼ <accordion-pane>)
WebFX.AccordionSelector ( ⟼ <accordion-selector>)
WebFX.AccordionSlot ( ⟼ <accordion-slot>)
WebFX.CanvasPane ( ⟼ <canvas-pane>)
WebFX.ColorPicker ( ⟼ <color-picker>)
WebFX.DatePicker ( ⟼ <date-picker>)
WebFX.DockPane ( ⟼ <dock-pane>)
WebFX.DropDownSelector ( ⟼ <dropdown-selector>)
WebFX.DropdownPane ( ⟼ <dropdown-pane>)
WebFX.FlowPane ( ⟼ <flow-pane>)
WebFX.GridPane ( ⟼ <vbox-pane>)
WebFX.HBoxPane ( ⟼ <hbox-pane>)
WebFX.MenuButton ( ⟼ <menu-button>)
WebFX.MenuPane ( ⟼ <menu-pane>)
WebFX.OverlayPane ( ⟼ <overlay-pane>)
WebFX.PushButton ( ⟼ <push-button>)
WebFX.SelectButton ( ⟼ <select-button>)
WebFX.SelectItem ( ⟼ <select-item>)
WebFX.SelectList ( ⟼ <select-list>)
WebFX.SliderControl ( ⟼ <slider-control>)
WebFX.SlidingPane ( ⟼ <sliding-pane>)
WebFX.StackablePane ( ⟼ <stackable-pane>)
WebFX.StateButton ( ⟼ <state-button>)
WebFX.SvgFactory (class)
WebFX.SvgIcon ( ⟼ <svg-icon>)
WebFX.SvgPane ( ⟼ <svg-pane>)
WebFX.TabPane ( ⟼ <tab-pane>)
WebFX.TabSelector ( ⟼ <tab-selector>)
WebFX.TabSlot ( ⟼ <tab-slot>)
WebFX.ToggleButton ( ⟼ <toggle-button>)
WebFX.TreeListPane ( ⟼ <tree-list-pane>)
WebFX.VBoxPane ( ⟼ <vbox-pane>)
WebFX.WindowPane ( ⟼ <window-pane>)
WebFX$CommonButtonEnvironment (class)

Overview

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
accordionPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.
canvasPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.
colorPicker.jsJavascriptKenneth F. GuerinCopyright © 2024-2025 Brick Mill Games, LLC, All rights reserved.
datePicker.jsJavascriptKenneth F. GuerinCopyright © 2025 Brick Mill Games, LLC, All rights reserved.
dockPane.jsJavascriptKenneth F. GuerinCopyright © 2023-2024 Brick Mill Games, LLC, All rights reserved.
dropdownPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.
flowPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.
gridPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.
hboxPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
menuPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.
observers.jsJavascriptKenneth F. GuerinCopyright © 2020-2024, Brick Mill Games, LLC. All rights reserved.
overlayPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
pushButton.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
selectList.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.
sliderControl.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.
slidingPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.
stackablePane.jsJavascriptKenneth F. GuerinCopyright © 2022-2024 Brick Mill Games, LLC, All rights reserved.
svgPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
tabPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.
treeListPane.jsJavascriptKenneth F. GuerinCopyright © 2025 Brick Mill Games, LLC, All rights reserved.
vboxPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
webfx.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
windowPane.jsJavascriptKenneth F. GuerinCopyright © 2023-2024 Brick Mill Games, LLC, All rights reserved.

Contents Directory

Objects
C DragEventObserver
C MouseEventObserver
N WebFX
C WebFX.AccordionPane ⟼ <accordion-pane>
C WebFX.AccordionSelector ⟼ <accordion-selector>
C WebFX.AccordionSlot ⟼ <accordion-slot>
C WebFX.CanvasPane ⟼ <canvas-pane>
C WebFX.ColorPicker ⟼ <color-picker>
C WebFX.DatePicker ⟼ <date-picker>
C WebFX.DockPane ⟼ <dock-pane>
C WebFX.DropDownSelector ⟼ <dropdown-selector>
C WebFX.DropdownPane ⟼ <dropdown-pane>
C WebFX.FlowPane ⟼ <flow-pane>
C WebFX.GridPane ⟼ <vbox-pane>
C WebFX.HBoxPane ⟼ <hbox-pane>
C WebFX.MenuButton ⟼ <menu-button>
C WebFX.MenuPane ⟼ <menu-pane>
C WebFX.OverlayPane ⟼ <overlay-pane>
C WebFX.PushButton ⟼ <push-button>
C WebFX.SelectButton ⟼ <select-button>
C WebFX.SelectItem ⟼ <select-item>
C WebFX.SelectList ⟼ <select-list>
C WebFX.SliderControl ⟼ <slider-control>
C WebFX.SlidingPane ⟼ <sliding-pane>
C WebFX.StackablePane ⟼ <stackable-pane>
C WebFX.StateButton ⟼ <state-button>
C WebFX.SvgFactory
C WebFX.SvgIcon ⟼ <svg-icon>
C WebFX.SvgPane ⟼ <svg-pane>
C WebFX.TabPane ⟼ <tab-pane>
C WebFX.TabSelector ⟼ <tab-selector>
C WebFX.TabSlot ⟼ <tab-slot>
C WebFX.ToggleButton ⟼ <toggle-button>
C WebFX.TreeListPane ⟼ <tree-list-pane>
C WebFX.VBoxPane ⟼ <vbox-pane>
C WebFX.WindowPane ⟼ <window-pane>
C WebFX$CommonButtonEnvironment
Constants & Methods
• disconnect (DragEventObserver)
• observe (DragEventObserver)
• disconnect (MouseEventObserver)
• observe (MouseEventObserver)
• observedAttributes (WebFX.AccordionPane)
• $activateSlot (WebFX.AccordionPane) <private>
• $activateSlot (WebFX.AccordionPane) <private>
• $deactivate (WebFX.AccordionPane) <private>
• $trigger (WebFX.AccordionPane) <private>
• attributeChangedCallback (WebFX.AccordionPane)
• connectedCallback (WebFX.AccordionPane)
• disconnectedCallback (WebFX.AccordionPane)
• observedAttributes (WebFX.AccordionSelector)
• active (WebFX.AccordionSelector)
• attributeChangedCallback (WebFX.AccordionSelector)
• connectedCallback (WebFX.AccordionSelector)
• disconnectedCallback (WebFX.AccordionSelector)
• observedAttributes (WebFX.AccordionSlot)
• active (WebFX.AccordionSlot)
• heading (WebFX.AccordionSlot)
• attributeChangedCallback (WebFX.AccordionSlot)
• connectedCallback (WebFX.AccordionSlot)
• disconnectedCallback (WebFX.AccordionSlot)
• observedAttributes (WebFX.CanvasPane)
• drawProc (WebFX.CanvasPane)
• factory (WebFX.CanvasPane)
• resizable (WebFX.CanvasPane)
• ro (WebFX.CanvasPane) <private>
• $configureCanvas (WebFX.CanvasPane) <private>
• $redrawPane (WebFX.CanvasPane) <private>
• attributeChangedCallback (WebFX.CanvasPane)
• connectedCallback (WebFX.CanvasPane)
• disconnectedCallback (WebFX.CanvasPane)
• observedAttributes (WebFX.ColorPicker)
• apply (WebFX.ColorPicker)
• rgb (WebFX.ColorPicker)
• value (WebFX.ColorPicker)
• $colorValueToRGB (WebFX.ColorPicker) <private>
• $findClosestPaletteColor (WebFX.ColorPicker) <private>
• $findExactPaletteColor (WebFX.ColorPicker) <private>
• $loadPaletteChoiceBox (WebFX.ColorPicker) <private>
• $rgbValueToRGB (WebFX.ColorPicker) <private>
• $setColorAsRGB (WebFX.ColorPicker) <private>
• $setColorAsValue (WebFX.ColorPicker) <private>
• $setSliderValues (WebFX.ColorPicker) <private>
• addPalette (WebFX.ColorPicker)
• attributeChangedCallback (WebFX.ColorPicker)
• connectedCallback (WebFX.ColorPicker)
• disconnectedCallback (WebFX.ColorPicker)
• removePalette (WebFX.ColorPicker)
• observedAttributes (WebFX.DatePicker)
• descending (WebFX.DatePicker)
• limits (WebFX.DatePicker)
• value (WebFX.DatePicker)
• $compare (WebFX.DatePicker) <private>
• $configure (WebFX.DatePicker) <private>
• $configureDate (WebFX.DatePicker) <private>
• $configureMonth (WebFX.DatePicker) <private>
• $configureYear (WebFX.DatePicker) <private>
• $dateOf (WebFX.DatePicker) <private>
• $loadValue (WebFX.DatePicker) <private>
• $monthOf (WebFX.DatePicker) <private>
• $setDate (WebFX.DatePicker) <private>
• $setDate (WebFX.DatePicker) <private>
• $setMonth (WebFX.DatePicker) <private>
• $setYear (WebFX.DatePicker) <private>
• $today (WebFX.DatePicker) <private>
• $updateButtonLabels (WebFX.DatePicker) <private>
• $yearOf (WebFX.DatePicker) <private>
• attributeChangedCallback (WebFX.DatePicker)
• connectedCallback (WebFX.DatePicker)
• disconnectedCallback (WebFX.DatePicker)
• observedAttributes (WebFX.DockPane)
• mode (WebFX.DockPane)
• side (WebFX.DockPane)
• trigger (WebFX.DockPane)
• triggerColor (WebFX.DockPane)
• $configure (WebFX.DockPane) <private>
• $connect (WebFX.DockPane) <private>
• $disconnect (WebFX.DockPane) <private>
• $hide (WebFX.DockPane) <private>
• $show (WebFX.DockPane) <private>
• attributeChangedCallback (WebFX.DockPane)
• connectedCallback (WebFX.DockPane)
• disconnectedCallback (WebFX.DockPane)
• lock (WebFX.DockPane)
• unlock (WebFX.DockPane)
• observedAttributes (WebFX.DropDownSelector)
• active (WebFX.DropDownSelector)
• attributeChangedCallback (WebFX.DropDownSelector)
• connectedCallback (WebFX.DropDownSelector)
• disconnectedCallback (WebFX.DropDownSelector)
• observedAttributes (WebFX.DropdownPane)
• expand (WebFX.DropdownPane)
• heading (WebFX.DropdownPane)
• $toggle (WebFX.DropdownPane)
• $trigger (WebFX.DropdownPane) <private>
• attributeChangedCallback (WebFX.DropdownPane)
• connectedCallback (WebFX.DropdownPane)
• disconnectedCallback (WebFX.DropdownPane)
• observedAttributes (WebFX.FlowPane)
• align (WebFX.FlowPane)
• column-gap (WebFX.FlowPane)
• direction (WebFX.FlowPane)
• gap (WebFX.FlowPane)
• inline (WebFX.FlowPane)
• justify (WebFX.FlowPane)
• row-gap (WebFX.FlowPane)
• wrap (WebFX.FlowPane)
• attributeChangedCallback (WebFX.FlowPane)
• connectedCallback (WebFX.FlowPane)
• disconnectedCallback (WebFX.FlowPane)
• observedAttributes (WebFX.GridPane)
• align (WebFX.GridPane)
• column-gap (WebFX.GridPane)
• column-spec (WebFX.GridPane)
• gap (WebFX.GridPane)
• justify (WebFX.GridPane)
• placement (WebFX.GridPane)
• row-gap (WebFX.GridPane)
• row-spec (WebFX.GridPane)
• spec (WebFX.GridPane)
• $configureGrid (WebFX.GridPane) <private>
• attributeChangedCallback (WebFX.GridPane)
• connectedCallback (WebFX.GridPane)
• disconnectedCallback (WebFX.GridPane)
• observedAttributes (WebFX.HBoxPane)
• expand (WebFX.HBoxPane)
• scrolling (WebFX.HBoxPane)
• $setExpansion (WebFX.HBoxPane) <private>
• $setScrolling (WebFX.HBoxPane) <private>
• attributeChangedCallback (WebFX.HBoxPane)
• connectedCallback (WebFX.HBoxPane)
• disconnectedCallback (WebFX.HBoxPane)
• observedAttributes (WebFX.MenuButton)
• abort (WebFX.MenuButton)
• action (WebFX.MenuButton)
• disabled (WebFX.MenuButton)
• hidden (WebFX.MenuButton)
• label (WebFX.MenuButton)
• svg (WebFX.MenuButton)
• where (WebFX.MenuButton)
• $manageChildren (WebFX.MenuButton) <private>
• $setContent (WebFX.MenuButton) <private>
• $trigger (WebFX.MenuButton) <private>
• attributeChangedCallback (WebFX.MenuButton)
• connectedCallback (WebFX.MenuButton)
• disable (WebFX.MenuButton)
• disconnectedCallback (WebFX.MenuButton)
• enable (WebFX.MenuButton)
• observedAttributes (WebFX.MenuPane)
• inactive (WebFX.MenuPane)
• level (WebFX.MenuPane)
• $ensureActive (WebFX.MenuPane) <private>
• $ensureFunctionality (WebFX.MenuPane) <private>
• $ensureInactive (WebFX.MenuPane) <private>
• $manageChildren (WebFX.MenuPane) <private>
• attributeChangedCallback (WebFX.MenuPane)
• connectedCallback (WebFX.MenuPane)
• disconnectedCallback (WebFX.MenuPane)
• elementAt (WebFX.MenuPane)
• has (WebFX.MenuPane)
• item (WebFX.MenuPane)
• itemAt (WebFX.MenuPane)
• locate (WebFX.MenuPane)
• shortcutValue (WebFX.MenuPane)
• observedAttributes (WebFX.OverlayPane)
• active (WebFX.OverlayPane)
• closeHandler (WebFX.OverlayPane)
• strict (WebFX.OverlayPane)
• tracking (WebFX.OverlayPane)
• $nsMouseDownHandler (WebFX.OverlayPane) <private>
• attributeChangedCallback (WebFX.OverlayPane)
• connectedCallback (WebFX.OverlayPane)
• disconnectedCallback (WebFX.OverlayPane)
• observedAttributes (WebFX.PushButton)
• action (WebFX.PushButton)
• callback (WebFX.PushButton)
• disabled (WebFX.PushButton)
• hidden (WebFX.PushButton)
• label (WebFX.PushButton)
• mo (WebFX.PushButton) <private>
• svg (WebFX.PushButton)
• $manageChildren (WebFX.PushButton) <private>
• $setContent (WebFX.PushButton) <private>
• $trigger (WebFX.PushButton) <private>
• attributeChangedCallback (WebFX.PushButton)
• connectedCallback (WebFX.PushButton)
• disable (WebFX.PushButton)
• disconnectedCallback (WebFX.PushButton)
• enable (WebFX.PushButton)
• observedAttributes (WebFX.SelectButton)
• action (WebFX.SelectButton)
• disabled (WebFX.SelectButton)
• hidden (WebFX.SelectButton)
• option (WebFX.SelectButton)
• selected (WebFX.SelectButton)
• $manageChildren (WebFX.SelectButton) <private>
• $trigger (WebFX.SelectButton) <private>
• attributeChangedCallback (WebFX.SelectButton)
• connectedCallback (WebFX.SelectButton)
• disable (WebFX.SelectButton)
• disconnectedCallback (WebFX.SelectButton)
• enable (WebFX.SelectButton)
• next (WebFX.SelectButton)
• previous (WebFX.SelectButton)
• observedAttributes (WebFX.SelectItem)
• selected (WebFX.SelectItem)
• attributeChangedCallback (WebFX.SelectItem)
• connectedCallback (WebFX.SelectItem)
• disconnectedCallback (WebFX.SelectItem)
• observedAttributes (WebFX.SelectList)
• callback (WebFX.SelectList)
• selections (WebFX.SelectList)
• stateless (WebFX.SelectList)
• upto (WebFX.SelectList)
• $select (WebFX.SelectList) <private>
• attributeChangedCallback (WebFX.SelectList)
• clear (WebFX.SelectList)
• connectedCallback (WebFX.SelectList)
• disconnectedCallback (WebFX.SelectList)
• observedAttributes (WebFX.SliderControl)
• clickAction (WebFX.SliderControl)
• clickAmount (WebFX.SliderControl)
• indicatorType (WebFX.SliderControl)
• majorTicks (WebFX.SliderControl)
• minorTicks (WebFX.SliderControl)
• onchange (WebFX.SliderControl)
• ondrag (WebFX.SliderControl)
• snapToTicks (WebFX.SliderControl)
• tickColor (WebFX.SliderControl)
• tickStyle (WebFX.SliderControl)
• trackColor (WebFX.SliderControl)
• value (WebFX.SliderControl)
• attributeChangedCallback (WebFX.SliderControl)
• connectedCallback (WebFX.SliderControl)
• disconnectedCallback (WebFX.SliderControl)
• observedAttributes (WebFX.SlidingPane)
• sliderWidth (WebFX.SlidingPane)
• attributeChangedCallback (WebFX.SlidingPane)
• connectedCallback (WebFX.SlidingPane)
• disconnectedCallback (WebFX.SlidingPane)
• observedAttributes (WebFX.StackablePane)
• attributeChangedCallback (WebFX.StackablePane)
• connectedCallback (WebFX.StackablePane)
• disconnectedCallback (WebFX.StackablePane)
• observedAttributes (WebFX.StateButton)
• action (WebFX.StateButton)
• disabled (WebFX.StateButton)
• hidden (WebFX.StateButton)
• value (WebFX.StateButton)
• $manageChildren (WebFX.StateButton) <private>
• $trigger (WebFX.StateButton) <private>
• attributeChangedCallback (WebFX.StateButton)
• connectedCallback (WebFX.StateButton)
• disable (WebFX.StateButton)
• disconnectedCallback (WebFX.StateButton)
• enable (WebFX.StateButton)
• next (WebFX.StateButton)
• reset (WebFX.StateButton)
• $alertCircleIconFactory (WebFX.SvgFactory) <private>
• $alertIconFactory (WebFX.SvgFactory) <private>
• $alertRingIconFactory (WebFX.SvgFactory) <private>
• $backstepIconFactory (WebFX.SvgFactory) <private>
• $calendarIconFactory (WebFX.SvgFactory) <private>
• $checkmarkIconFactory (WebFX.SvgFactory) <private>
• $circleIconFactory (WebFX.SvgFactory) <private>
• $closeIconFactory (WebFX.SvgFactory) <private>
• $cloudDownloadIconFactory (WebFX.SvgFactory) <private>
• $cloudIconFactory (WebFX.SvgFactory) <private>
• $cloudUploadIconFactory (WebFX.SvgFactory) <private>
• $diamondIconFactory (WebFX.SvgFactory) <private>
• $downArrowIconFactory (WebFX.SvgFactory) <private>
• $downTriangleIconFactory (WebFX.SvgFactory) <private>
• $fileIconFactory (WebFX.SvgFactory) <private>
• $fileViewIconFactory (WebFX.SvgFactory) <private>
• $folderIconFactory (WebFX.SvgFactory) <private>
• $fwdstepIconFactory (WebFX.SvgFactory) <private>
• $gearIconFactory (WebFX.SvgFactory) <private>
• $hamburgerIconFactory (WebFX.SvgFactory) <private>
• $hexagonIconFactory (WebFX.SvgFactory) <private>
• $hollowCircleIconFactory (WebFX.SvgFactory) <private>
• $hollowDiamondIconFactory (WebFX.SvgFactory) <private>
• $hollowDownTriangleIconFactory (WebFX.SvgFactory) <private>
• $hollowHexagonIconFactory (WebFX.SvgFactory) <private>
• $hollowLeftTriangleIconFactory (WebFX.SvgFactory) <private>
• $hollowOctagonIconFactory (WebFX.SvgFactory) <private>
• $hollowRightTriangleIconFactory (WebFX.SvgFactory) <private>
• $hollowRsquareIconFactory (WebFX.SvgFactory) <private>
• $hollowSquareIconFactory (WebFX.SvgFactory) <private>
• $hollowUpTriangleIconFactory (WebFX.SvgFactory) <private>
• $homeIconFactory (WebFX.SvgFactory) <private>
• $infoCircleIconFactory (WebFX.SvgFactory) <private>
• $infoIconFactory (WebFX.SvgFactory) <private>
• $infoRingIconFactory (WebFX.SvgFactory) <private>
• $installDefaults (WebFX.SvgFactory) <private>
• $leftArrowIconFactory (WebFX.SvgFactory) <private>
• $leftTriangleIconFactory (WebFX.SvgFactory) <private>
• $loginIconFactory (WebFX.SvgFactory) <private>
• $logoutIconFactory (WebFX.SvgFactory) <private>
• $minusIconFactory (WebFX.SvgFactory) <private>
• $octagonIconFactory (WebFX.SvgFactory) <private>
• $opacityMenuIconFactory (WebFX.SvgFactory) <private>
• $opaqueIconFactory (WebFX.SvgFactory) <private>
• $pauseIconFactory (WebFX.SvgFactory) <private>
• $pencilIconFactory (WebFX.SvgFactory) <private>
• $plusIconFactory (WebFX.SvgFactory) <private>
• $powerIconFactory (WebFX.SvgFactory) <private>
• $pushpinIconFactory (WebFX.SvgFactory) <private>
• $questionCircleIconFactory (WebFX.SvgFactory) <private>
• $questionIconFactory (WebFX.SvgFactory) <private>
• $questionRingIconFactory (WebFX.SvgFactory) <private>
• $redoArrowIconFactory (WebFX.SvgFactory) <private>
• $refreshArrowIconFactory (WebFX.SvgFactory) <private>
• $rightArrowIconFactory (WebFX.SvgFactory) <private>
• $rightTriangleIconFactory (WebFX.SvgFactory) <private>
• $rsquareIconFactory (WebFX.SvgFactory) <private>
• $saveIconFactory (WebFX.SvgFactory) <private>
• $searchIconFactory (WebFX.SvgFactory) <private>
• $squareIconFactory (WebFX.SvgFactory) <private>
• $swapArrowsIconFactory (WebFX.SvgFactory) <private>
• $thinDownArrowIconFactory (WebFX.SvgFactory) <private>
• $thinLeftArrowIconFactory (WebFX.SvgFactory) <private>
• $thinRedoArrowIconFactory (WebFX.SvgFactory) <private>
• $thinRefreshArrowIconFactory (WebFX.SvgFactory) <private>
• $thinRightArrowIconFactory (WebFX.SvgFactory) <private>
• $thinSwapArrowsIconFactory (WebFX.SvgFactory) <private>
• $thinUndoArrowIconFactory (WebFX.SvgFactory) <private>
• $thinUpArrowIconFactory (WebFX.SvgFactory) <private>
• $toggleDownIconFactory (WebFX.SvgFactory) <private>
• $toggleIndentIconFactory (WebFX.SvgFactory) <private>
• $toggleRightIconFactory (WebFX.SvgFactory) <private>
• $translucentIconFactory (WebFX.SvgFactory) <private>
• $transparentIconFactory (WebFX.SvgFactory) <private>
• $trashCanIconFactory (WebFX.SvgFactory) <private>
• $undoArrowIconFactory (WebFX.SvgFactory) <private>
• $upArrowIconFactory (WebFX.SvgFactory) <private>
• $upTriangleIconFactory (WebFX.SvgFactory) <private>
• $userIconFactory (WebFX.SvgFactory) <private>
• $viewIconFactory (WebFX.SvgFactory) <private>
• $zoomInIconFactory (WebFX.SvgFactory) <private>
• $zoomMenuDownIconFactory (WebFX.SvgFactory) <private>
• $zoomMenuRightIconFactory (WebFX.SvgFactory) <private>
• $zoomOutIconFactory (WebFX.SvgFactory) <private>
• draw (WebFX.SvgFactory)
• install (WebFX.SvgFactory)
• is_installed (WebFX.SvgFactory)
• observedAttributes (WebFX.SvgIcon)
• baseType (WebFX.SvgIcon)
• iconType (WebFX.SvgIcon)
• $redrawPane (WebFX.SvgIcon) <private>
• attributeChangedCallback (WebFX.SvgIcon)
• connectedCallback (WebFX.SvgIcon)
• disconnectedCallback (WebFX.SvgIcon)
• observedAttributes (WebFX.SvgPane)
• drawProc (WebFX.SvgPane)
• factory (WebFX.SvgPane)
• $redrawPane (WebFX.SvgPane) <private>
• attributeChangedCallback (WebFX.SvgPane)
• connectedCallback (WebFX.SvgPane)
• disconnectedCallback (WebFX.SvgPane)
• observedAttributes (WebFX.TabPane)
• add_button (WebFX.TabPane)
• add_icon (WebFX.TabPane)
• close_icon (WebFX.TabPane)
• icon_style (WebFX.TabPane)
• onadd (WebFX.TabPane)
• onclose (WebFX.TabPane)
• style (WebFX.TabPane)
• $addAddButton (WebFX.TabPane) <private>
• $deactivate (WebFX.TabPane) <private>
• $loadSelector (WebFX.TabPane) <private>
• $removeAddButton (WebFX.TabPane) <private>
• $trigger (WebFX.TabPane) <private>
• $updateScrollability (WebFX.TabPane) <private>
• activateNthSlot (WebFX.TabPane)
• activateSlot (WebFX.TabPane)
• attributeChangedCallback (WebFX.TabPane)
• closeNthSlot (WebFX.TabPane)
• closeSlot (WebFX.TabPane)
• connectedCallback (WebFX.TabPane)
• disconnectedCallback (WebFX.TabPane)
• observedAttributes (WebFX.TabSelector)
• active (WebFX.TabSelector)
• $updateContents (WebFX.TabSelector) <private>
• attributeChangedCallback (WebFX.TabSelector)
• connectedCallback (WebFX.TabSelector)
• disconnectedCallback (WebFX.TabSelector)
• getCloseIcon (WebFX.TabSelector)
• setCloseIcon (WebFX.TabSelector)
• setContents (WebFX.TabSelector)
• setHeading (WebFX.TabSelector)
• observedAttributes (WebFX.TabSlot)
• active (WebFX.TabSlot)
• closable (WebFX.TabSlot)
• heading (WebFX.TabSlot)
• scrolling (WebFX.TabSlot)
• attributeChangedCallback (WebFX.TabSlot)
• connectedCallback (WebFX.TabSlot)
• disconnectedCallback (WebFX.TabSlot)
• observedAttributes (WebFX.ToggleButton)
• action (WebFX.ToggleButton)
• disabled (WebFX.ToggleButton)
• hidden (WebFX.ToggleButton)
• $manageChildren (WebFX.ToggleButton) <private>
• $trigger (WebFX.ToggleButton) <private>
• attributeChangedCallback (WebFX.ToggleButton)
• connectedCallback (WebFX.ToggleButton)
• disable (WebFX.ToggleButton)
• disconnectedCallback (WebFX.ToggleButton)
• enable (WebFX.ToggleButton)
• off (WebFX.ToggleButton)
• on (WebFX.ToggleButton)
• tap (WebFX.ToggleButton)
• observedAttributes (WebFX.TreeListPane)
• caption (WebFX.TreeListPane)
• attributeChangedCallback (WebFX.TreeListPane)
• connectedCallback (WebFX.TreeListPane)
• disconnectedCallback (WebFX.TreeListPane)
• observedAttributes (WebFX.VBoxPane)
• expand (WebFX.VBoxPane)
• scrolling (WebFX.VBoxPane)
• $setExpansion (WebFX.VBoxPane) <private>
• $setScrolling (WebFX.VBoxPane) <private>
• attributeChangedCallback (WebFX.VBoxPane)
• connectedCallback (WebFX.VBoxPane)
• disconnectedCallback (WebFX.VBoxPane)
• observedAttributes (WebFX.WindowPane)
• closable (WebFX.WindowPane)
• onfloat (WebFX.WindowPane)
• onmove (WebFX.WindowPane)
• onresize (WebFX.WindowPane)
• resizable (WebFX.WindowPane)
• title (WebFX.WindowPane)
• title-background (WebFX.WindowPane)
• title-color (WebFX.WindowPane)
• title-font (WebFX.WindowPane)
• attributeChangedCallback (WebFX.WindowPane)
• connectedCallback (WebFX.WindowPane)
• disconnectedCallback (WebFX.WindowPane)
• button (WebFX$CommonButtonEnvironment)
• content (WebFX$CommonButtonEnvironment)
• css (WebFX$CommonButtonEnvironment)
• disabled (WebFX$CommonButtonEnvironment)
• hidden (WebFX$CommonButtonEnvironment)
• html (WebFX$CommonButtonEnvironment)
• $connectMouseEventListeners (WebFX$CommonButtonEnvironment) <private>
• $disconnectMouseEventListeners (WebFX$CommonButtonEnvironment) <private>
• $keyDownHandler (WebFX$CommonButtonEnvironment) <private>
• $mouseDownHandler (WebFX$CommonButtonEnvironment) <private>
• $mouseOutHandler (WebFX$CommonButtonEnvironment) <private>
• $mouseOverHandler (WebFX$CommonButtonEnvironment) <private>
• $mouseUpHandler (WebFX$CommonButtonEnvironment) <private>
• $preventDefault (WebFX$CommonButtonEnvironment) <private>
• $trigger (WebFX$CommonButtonEnvironment) <private>
• connect (WebFX$CommonButtonEnvironment)
• disconnect (WebFX$CommonButtonEnvironment)
• getContent (WebFX$CommonButtonEnvironment)
• setContent (WebFX$CommonButtonEnvironment)

Class: DragEventObserver

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
observers.jsJavascriptKenneth F. GuerinCopyright © 2020-2024, Brick Mill Games, LLC. All rights reserved.

Overview

This class provides drag event handling for elements listening to drag-n-drop operations handled via the $.tracking singleton (see overlayPane.js)

Constructor Registry

Item
Attributes
new DragEventObserver(callback)
-

Method Registry

Item
Attributes
disconnect()
<api>
observe()
<api>

Constructor Details

new DragEventObserver(callback)

Parameters:

  • callback [Function] — this callback provides the application hook to handle drag events

Method Details

disconnect()   <api>

This method implements the disconnect API defined for observers.

observe()   <api>

This method implements the observe API defined for observers.

Class: MouseEventObserver

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
observers.jsJavascriptKenneth F. GuerinCopyright © 2020-2024, Brick Mill Games, LLC. All rights reserved.

Overview

This class provides advanced mouse event handling for browser applications.

Constructor Registry

Item
Attributes
new MouseEventObserver(callback)
-

Method Registry

Item
Attributes
disconnect()
<api>
observe()
<api>

Constructor Details

new MouseEventObserver(callback)

Parameters:

  • callback [Function] — this callback provides the application hook to handle advanced mouse events

Method Details

disconnect()   <api>

This method implements the disconnect API defined for observers.

observe()   <api>

This method implements the observe API defined for observers.

Namespace: WebFX

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
accordionPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.
canvasPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.
colorPicker.jsJavascriptKenneth F. GuerinCopyright © 2024-2025 Brick Mill Games, LLC, All rights reserved.
datePicker.jsJavascriptKenneth F. GuerinCopyright © 2025 Brick Mill Games, LLC, All rights reserved.
dockPane.jsJavascriptKenneth F. GuerinCopyright © 2023-2024 Brick Mill Games, LLC, All rights reserved.
dropdownPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.
flowPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.
gridPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.
hboxPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
menuPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.
overlayPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
pushButton.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
selectList.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.
sliderControl.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.
slidingPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.
stackablePane.jsJavascriptKenneth F. GuerinCopyright © 2022-2024 Brick Mill Games, LLC, All rights reserved.
svgPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
tabPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.
treeListPane.jsJavascriptKenneth F. GuerinCopyright © 2025 Brick Mill Games, LLC, All rights reserved.
vboxPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
webfx.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.
windowPane.jsJavascriptKenneth F. GuerinCopyright © 2023-2024 Brick Mill Games, LLC, All rights reserved.

Overview

The WebFX namespace encapsulates all definitions related to the family of WebFX classes used for browser-based application development.

Class: WebFX.AccordionPane ⟼ <accordion-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
accordionPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <accordionPane>

Constructor Registry

Item
Attributes
new WebFX.AccordionPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Method Registry

Item
Attributes
$activateSlot(nth)
<private>
$activateSlot(slotElement)
<private>
$deactivate()
<private>
$trigger(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.AccordionPane()

The accordion-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Method Details

$activateSlot(nth)   <private>

This private method is used to activate a particular accordion-slot.

Parameters:

  • nth [Integer] — the nth accordion-slot child to activate

$activateSlot(slotElement)   <private>

This private method is used to activate a particular accordion-slot.

Parameters:

  • slotElement [HTMLElement] — the accordion-slot element to activate

$deactivate()   <private>

This private method is used to deactivate the current active accordion-slot.

$trigger(event)   <private>

This private method is used to conduct actions based on a successful mouse click on an accordion-selector. The method will determine which accordion-slot is associated with the accordion-selector that was clicked.

Parameters:

  • event [Object] — the event received from the browser

attributeChangedCallback(name, oldValue, newValue)   <api>

For this control, nothing happens when an attribute is changed. The CSS handles look & feel changes.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets the mouse-click event listener.

disconnectedCallback()   <api>

Upon connection to the DOM, this method removes the mouse-click event listener.

Class: WebFX.AccordionSelector ⟼ <accordion-selector>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
accordionPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <accordion-selector>

An accordion-selector is used with a accordion-pane's shadow DOM in order to allow the user to expand / contract the accordion-pane.

Constructor Registry

Item
Attributes
new WebFX.AccordionSelector()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
active ↔ Boolean
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.AccordionSelector()

The accordion-selector constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

active ↔ Boolean

This property determines whether the accordion-selector is in the active state or not.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

For this control, nothing happens when an attribute is changed. The CSS handles look & feel changes.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings.

disconnectedCallback()   <api>

For this control, nothing happens when it is disconnected.

Class: WebFX.AccordionSlot ⟼ <accordion-slot>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
accordionPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <accordion-slot>

An accordion-slot is used to define the contents of each block of information within an accordion-pane.

Constructor Registry

Item
Attributes
new WebFX.AccordionSlot()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
active ↔ Boolean
-
heading ↔ String
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.AccordionSlot()

The accordion-slot constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

active ↔ Boolean

This property determines whether the associated accordion-selector is in the active state or not.

heading ↔ String

This property sets the value of the associated accordion-selector in the shadow DOM.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'heading': change the accordion-selector's value based on the new heading value - 'active': show/hide the accordion-pane's contents and update the accordion-selector's active state

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings and adds the private $trigger event listener.

disconnectedCallback()   <api>

For this control, nothing happens when it is disconnected.

Class: WebFX.CanvasPane ⟼ <canvas-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
canvasPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <canvas-pane>

An canvas-pane encapsulates a canvas element.

Constructor Registry

Item
Attributes
new WebFX.CanvasPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
drawProc ↔ Function
-
factory ↔ Function
-
resizable ↔ Boolean
-
ro ↔ ResizeObserver
<private>

Method Registry

Item
Attributes
$configureCanvas()
<private>
$redrawPane()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.CanvasPane()

The canvas-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

drawProc ↔ Function

This property, set via the canvas-pane's "draw" attribute, is called in response to drawing events.

factory ↔ Function

This property, set directly via JS code, is called in response to drawing events instead of the drawProc.

resizable ↔ Boolean

This property determines if the canvas can be resized, true by default.

ro ↔ ResizeObserver   <private>

This internal property is used to track element size changes in order to redraw the content.

Method Details

$configureCanvas()   <private>

This private method will create the inner canvas based on the current dimensions of the enclosing div element.

$redrawPane()   <private>

This method will redraw the embedded SVG based either on the factory property or on the 'draw' attibute.

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'draw' attribute changes, the embedded SVG element will be replaced.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets the element's drawProc, sets the resizable to its default value of "true", if necessary, and sets the ResizeObserver to observe if the pane is resizable.

disconnectedCallback()   <api>

When this element is disconnected, the drawProc is removed and the ResizeObserver is set to unobserve if the pane is resizable.

Class: WebFX.ColorPicker ⟼ <color-picker>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
colorPicker.jsJavascriptKenneth F. GuerinCopyright © 2024-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <color-picker>

Color picker controls are used to choose colors using a variety of input styles.

Constructor Registry

Item
Attributes
new WebFX.ColorPicker()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
apply ↔ Number
-
rgb ↔ Number
-
value ↔ Number
-

Method Registry

Item
Attributes
$colorValueToRGB(value) → Array<Integer>
<private>
$findClosestPaletteColor(all) → String
<private>
$findExactPaletteColor(all) → String
<private>
$loadPaletteChoiceBox()
<private>
$rgbValueToRGB(rgb) → Array<Integer>
<private>
$setColorAsRGB(rgb, how)
<private>
$setColorAsValue(value, how)
<private>
$setSliderValues()
<private>
addPalette(name, palette)
-
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>
removePalette(name)
-

Constructor Details

new WebFX.ColorPicker()

The color-picker constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the ResizeObserver to react to changes in color-picker size and a MouseEventObserver to react to mouse events.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

apply ↔ Number

This property sets the apply procedure to call.

rgb ↔ Number

This property manages the current RGB color value of the color-picker.

value ↔ Number

This property manages the current value of the color-picker.

Method Details

$colorValueToRGB(value) → Array<Integer>   <private>

This method is used to convert the current color value to an RGB specification.

Parameters:

  • value [String] — the color value to convert

Returns:

  • [Array<Integer>] — the converted RGB value

$findClosestPaletteColor(all) → String   <private>

This method is used to find a palette entry containing a color value closest to the currentn color value.

Parameters:

  • all [Boolean] — searches all palettes, if true, and the current palette, if false

Returns:

  • [String] — the name of the color which matches

$findExactPaletteColor(all) → String   <private>

This method is used to find a palette entry containing the current color value.

Parameters:

  • all [Boolean] — searches all palettes, if true, and the current palette, if false

Returns:

  • [String] — the name of the color which matches

$loadPaletteChoiceBox()   <private>

This method is used to load a palette's color into the control's choice box.

$rgbValueToRGB(rgb) → Array<Integer>   <private>

This method is used to convert the current color value to an RGB specification.

Parameters:

  • rgb [String or Array<Integer>] — the RGB color value to convert

Returns:

  • [Array<Integer>] — the converted RGB value

$setColorAsRGB(rgb, how)   <private>

This method is used to set the current color as a name.

Parameters:

  • rgb [String or Array<Integer>] — the RGB color value to convert
  • how [Integer] — the method to use to handle the conversion <default: 0>

$setColorAsValue(value, how)   <private>

This method is used to set the current color as a name.

Parameters:

  • value [String] — the color value to convert
  • how [Integer] — the method to use to handle the conversion <default: 0>

$setSliderValues()   <private>

This method is used to set the slider values based on the current color.

addPalette(name, palette)

This method is used to add a palette to the control's palette list.

Parameters:

  • name [String] — the name of the palette to add
  • palette [Hash] — the palette contents indexed by color name.

attributeChangedCallback(name, oldValue, newValue)   <api>

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>


disconnectedCallback()   <api>


removePalette(name)

This method is used to remove a palette to the control's palette list.

Parameters:

  • name [String] — the name of the palette to remove

Class: WebFX.DatePicker ⟼ <date-picker>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
datePicker.jsJavascriptKenneth F. GuerinCopyright © 2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <date-picker>

Date picker controls are used to choose colors using a variety of input styles.

Constructor Registry

Item
Attributes
new WebFX.DatePicker()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
descending ↔ Boolean
-
limits ↔ String
-
value ↔ Number
-

Method Registry

Item
Attributes
$compare(a, b) → Integer
<private>
$configure()
<private>
$configureDate()
<private>
$configureMonth()
<private>
$configureYear()
<private>
$dateOf(value)
<private>
$loadValue()
<private>
$monthOf(value)
<private>
$setDate(date)
<private>
$setDate()
<private>
$setMonth(month)
<private>
$setYear(year)
<private>
$today()
<private>
$updateButtonLabels()
<private>
$yearOf(value)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.DatePicker()

The date-picker constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the ResizeObserver to react to changes in date-picker size and a MouseEventObserver to react to mouse events.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

descending ↔ Boolean

This property manages the sort order of the year button.

limits ↔ String

This property manages the legal date range limits.

value ↔ Number

This property manages the current value of the date-picker.

Method Details

$compare(a, b) → Integer   <private>

This method is used to compare two dates.

Parameters:

  • a [String] — one date value
  • b [String] — one date value <default: the current value>

Returns:

  • [Integer] — the comparision value between the two date values

$configure()   <private>

This method is used to set control button's submenu contents.

$configureDate()   <private>

This method is used to set date button's submenu contents based on the current month and year.

$configureMonth()   <private>

This method is used to set month button's submenu contents.

$configureYear()   <private>

This method is used to set year button's submenu contents.

$dateOf(value)   <private>

This method is used to extract the date portion of the specified value.

Parameters:

  • value [String] — the date value to process <default: the current value>

$loadValue()   <private>

This method is used to load the current value by configuring the buttons and applying button labels.

$monthOf(value)   <private>

This method is used to extract the month portion of the specified value.

Parameters:

  • value [String] — the date value to process <default: the current value>

$setDate(date)   <private>

This method is used to set the date portion of the current value.

Parameters:

  • date [String] — the date value to set

$setDate()   <private>

This method is used to ensure that the current date value is within limits.

$setMonth(month)   <private>

This method is used to set the month portion of the current value.

Parameters:

  • month [String] — the month value to set

$setYear(year)   <private>

This method is used to set the year portion of the current value.

Parameters:

  • year [String] — the year value to set

$today()   <private>

This method is used to calculate today's date.

$updateButtonLabels()   <private>

This method is used to update the labels of each button based on the current value.

$yearOf(value)   <private>

This method is used to extract the year portion of the specified value.

Parameters:

  • value [String] — the date value to process <default: the current value>

attributeChangedCallback(name, oldValue, newValue)   <api>

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method loads the current value into the buttons and sets the button's callback procedures.

disconnectedCallback()   <api>


Class: WebFX.DockPane ⟼ <dock-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
dockPane.jsJavascriptKenneth F. GuerinCopyright © 2023-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <dock-pane>

Dock panes are panes which attach to the sides of a parent element.

Constructor Registry

Item
Attributes
new WebFX.DockPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
mode ↔ String
-
side ↔ String
-
trigger ↔ String
-
triggerColor ↔ String
-

Method Registry

Item
Attributes
$configure(set_hidden_value)
<private>
$connect()
<private>
$disconnect()
<private>
$hide()
<private>
$show()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>
lock(open)
-
unlock()
-

Constructor Details

new WebFX.DockPane()

The dock-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

mode ↔ String

This property manages dock-pane's operating mode.

side ↔ String

This property manages dock-pane's attachment side.

trigger ↔ String

This property manages dock-pane's trigger size (when mode is 'auto-hide').

triggerColor ↔ String

This property manages dock-pane's trigger border color.

Method Details

$configure(set_hidden_value)   <private>

This private API call sets the sizing and location and auto-hide trigger properties of the dock-pane.

Parameters:

  • set_hidden_value [Boolean or Null] — the value to set the auto-hide hidden state, or null to keep the setting unchanged <default: null>

$connect()   <private>

This private API call, called on the connect event, configures the dock-pane properties that rely on the dock-pane being visible. It sets the mouse event handlers needed for auto-hide functionality.

$disconnect()   <private>

This private API call, called on the disconnect event or mode switch from auto-hide to static, removes the mouse event handlers needed for auto-hide functionality.

$hide()   <private>

This private API call hides the dock-pane, revealing only the trigger. It is called on mouseleave events.

$show()   <private>

This private API call shows the dock-pane, hiding the trigger region. It is called on mouseenter events.

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'side': change the dock-pane's docking side - 'mode': change the dock-pane's operating mode

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the auto-hide machinery.

disconnectedCallback()   <api>

Upon disconnection to the DOM, this method disables the auto-hide machinery.

lock(open)

This function will lock a dock capable of auto-hiding into an open or closed position. This is useful when popup-menus are called from a button on such a dock.

Parameters:

  • open [Boolean] — the value to set the locked state of a dock capable of auto-hiding <default: true>

unlock()

This function will unlock a locked dock.

Class: WebFX.DropDownSelector ⟼ <dropdown-selector>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
dropdownPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <dropdown-selector>

A dropdown-selector is used with a dropdown-pane's shadow DOM in order to allow the user to expand / contract the dropdown-pane.

Constructor Registry

Item
Attributes
new WebFX.DropDownSelector()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
active ↔ Boolean
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.DropDownSelector()

The dropdown-selector constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

active ↔ Boolean

This property determines whether the dropdown-selector is in the active state or not.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

For this control, nothing happens when an attribute is changed. The CSS handles look & feel changes.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings.

disconnectedCallback()   <api>

For this control, nothing happens when it is disconnected.

Class: WebFX.DropdownPane ⟼ <dropdown-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
dropdownPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <dropdown-pane>

The dropdown pane is a construct that allows for blocks of information within the web document or application to be hidden and/or shown by the user.

Constructor Registry

Item
Attributes
new WebFX.DropdownPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
expand ↔ Boolean
-
heading ↔ String
-

Method Registry

Item
Attributes
$toggle()
-
$trigger(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.DropdownPane()

The dropdown-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

expand ↔ Boolean

This property determines whether the dropdown-pane's content is visible or not.

heading ↔ String

This property sets the value of the dropdown-selector in the shadow DOM.

Method Details

$toggle()

This private method toggles the expand property's value between 'false' and 'true'.

$trigger(event)   <private>

This private method is used to toggle the state of the dropdown-pane if the mouse-click occured within the dropdown-selector.

Parameters:

  • event [Object] — the event received from the browser

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'heading': change the dropdown-selector's value based on the new heading value - 'expand': show/hide the dropdown-pane's contents and update the dropdown-selector's active state

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings and adds the private $trigger event listener.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method removes event listeners.

Class: WebFX.FlowPane ⟼ <flow-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
flowPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <flow-pane>

Flow panes are single-row flex boxes that are used to hold other elements.

Constructor Registry

Item
Attributes
new WebFX.FlowPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
align ↔ String
-
column-gap ↔ String
-
direction ↔ String
-
gap ↔ String
-
inline ↔ String
-
justify ↔ String
-
row-gap ↔ String
-
wrap ↔ String
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.FlowPane()

The flow-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

align ↔ String

This property sets the flow-pane's item alignment when filling

column-gap ↔ String

This property sets the flow-pane's item row and column when filling

direction ↔ String

This property sets the flow-pane's direction when filling

gap ↔ String

This property sets the flow-pane's item row and column when filling

inline ↔ String

This property sets whether the flow-pane is an inline or block object

justify ↔ String

This property sets the flow-pane's justify when filling

row-gap ↔ String

This property sets the flow-pane's item row and column when filling

wrap ↔ String

This property sets the flow-pane's wrap when filling

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'direction': change the flow-pane's direction

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

This method marks the control as connected and configures it.

disconnectedCallback()   <api>

This method marks the control as disconnected.

Class: WebFX.GridPane ⟼ <vbox-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
gridPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <grid-pane>

Grid panes are grids that are used to hold other elements.

Constructor Registry

Item
Attributes
new WebFX.GridPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
align ↔ String
-
column-gap ↔ String
-
column-spec ↔ String
-
gap ↔ String
-
justify ↔ String
-
placement ↔ String
-
row-gap ↔ String
-
row-spec ↔ String
-
spec ↔ String
-

Method Registry

Item
Attributes
$configureGrid()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.GridPane()

The grid-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

align ↔ String

This property manages grid-pane item's vertical positioning properties.

column-gap ↔ String

This property manages grid-pane's intra-column spacing properties.

column-spec ↔ String

This property manages grid-pane's column layout properties.

gap ↔ String

This property manages grid-pane's intra-row/column spacing properties.

justify ↔ String

This property manages grid-pane item's horizontal positioning properties.

placement ↔ String

This property manages grid-pane item's justify/align properties.

row-gap ↔ String

This property manages grid-pane's intra-row spacing properties.

row-spec ↔ String

This property manages grid-pane's row layout properties.

spec ↔ String

This property manages grid-pane's row/column layout properties.

Method Details

$configureGrid()   <private>

This method is used to set the various layout properties of the grid.

attributeChangedCallback(name, oldValue, newValue)   <api>

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method configures the grid-pane's layout.

disconnectedCallback()   <api>


Class: WebFX.HBoxPane ⟼ <hbox-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
hboxPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <hbox-pane>

HBox panes are single-row grids that are used to hold other elements.

Constructor Registry

Item
Attributes
new WebFX.HBoxPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
expand ↔ String
-
scrolling ↔ String
-

Method Registry

Item
Attributes
$setExpansion()
<private>
$setScrolling()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.HBoxPane()

The hbox-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

expand ↔ String

This property manages hbox-pane's expandability options.

scrolling ↔ String

This property determines whether the vbox-pane's content is scrollable: none, vertical, horizontal, both.

Method Details

$setExpansion()   <private>

This method is used to set the expansion capability / layout of the control.

$setScrolling()   <private>

This method is used to set the scrolling capability / layout of the control.

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'expand': change the vbox-pane's expandability option

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the MutationObserver

disconnectedCallback()   <api>

Upon disconnection to the DOM, this method disables the MutationObserver

Class: WebFX.MenuButton ⟼ <menu-button>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pushButton.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <menu-button>

This type of button triggers a pop-up menu. Menu buttons must take <menu-pane> tags as children.

Constructor Registry

Item
Attributes
new WebFX.MenuButton()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
abort ↔ Function
-
action ↔ Function
-
disabled ↔ Boolean
-
hidden ↔ Boolean
-
label ↔ String
-
svg ↔ String
-
where ↔ String
-

Method Registry

Item
Attributes
$manageChildren()
<private>
$setContent()
<private>
$trigger(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disable()
-
disconnectedCallback()
<api>
enable()
-

Constructor Details

new WebFX.MenuButton()

The menu-button constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the MutationObserver to react to changes in select-button content.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

abort ↔ Function

This property, set via code or the push-button's "abort" attribute, is called in response to an aborted menu operation.

action ↔ Function

This property, set via code or the push-button's "action" attribute, is called in response to a valid menu selection.

disabled ↔ Boolean

This property manages the push-button's ability to respond to events.

hidden ↔ Boolean

This property manages the push-button's visibility.

label ↔ String

This property manages the menu button's textual representation.

svg ↔ String

This property manages the SVG icon content representation of the push button.

where ↔ String

This property manages the location of the popup menu in relation to the button.

Method Details

$manageChildren()   <private>

This private method is used to ensure that all children are option tags.

$setContent()   <private>

This private method is used to set the menu-button's content representation.

$trigger(event)   <private>

This private method is used to conduct actions based on a successful mouse click or key down event.

Parameters:

  • event [Object] — the event received from the browser

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'disabled' attribute has changed, add/remove event listeners based on the new value.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the MutationObserver, sets the tabindex and enables the mouse event handlers.

disable()

Disables the button's ability to respond to events.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method disables the mouse event listeners and the MutationObserver.

enable()

Enables the button's ability to respond to events.

Class: WebFX.MenuPane ⟼ <menu-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
menuPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <menu-pane>

The menu pane is a construct that allows for popup-menus to be display and acted upon. Menu panes can contain other menu panes.

Constructor Registry

Item
Attributes
new WebFX.MenuPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
inactive ↔ Boolean
-
level ↔ Integer
-

Method Registry

Item
Attributes
$ensureActive()
<private>
$ensureFunctionality()
<private>
$ensureInactive()
<private>
$manageChildren()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>
elementAt(x, y) → HTMLElement or Null
-
has(element) → Integer or Null
-
item(element) → HTMLElement or Null
-
itemAt(x, y) → HTMLElement or Null
-
locate(x, y) → Integer or Null
-
shortcutValue(shortcut) → String
-

Constructor Details

new WebFX.MenuPane()

The dropdown-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the MutationObserver to react to changes in menu-pane content.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

inactive ↔ Boolean

This property determines the visibility of the menu-pane.

level ↔ Integer

This property determines whether the dropdown-pane's content is visible or not.

Method Details

$ensureActive()   <private>

This private method is used to set the menu-pane's functionality when active. Among the primary functions is to ensure that the menu-pane's contents can be seen by adjusting its position and/or making its content area scrollable.

$ensureFunctionality()   <private>

This private method is used to set the menu-pane's functionality based on the inactive state.

$ensureInactive()   <private>

This private method is used to set the menu-pane's functionality when inactive.

$manageChildren()   <private>

This private method is used to manage the button's text based on its type, state and multichoice selection.

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'inactive' attribute has changed, update the UI and add/remove event listeners based on the new value.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method manages its children and sets the MutationObserver to observe changes.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method disconnects from the MutationObserver.

elementAt(x, y) → HTMLElement or Null

Parameters:

  • x [Number] — the x-coordinate used to pinpoint the item
  • y [Number] — the y-coordinate used to pinpoint the item

Returns:

  • [HTMLElement or Null] — the nth tr element, or null if not found

has(element) → Integer or Null

Parameters:

  • element [HTMLElement] — the element to find

Returns:

  • [Integer or Null] — the index into the menu-pane where the element is, or null if not found

item(element) → HTMLElement or Null

Parameters:

  • element [HTMLElement] — the element to find

Returns:

  • [HTMLElement or Null] — the nth element, or null if not found

itemAt(x, y) → HTMLElement or Null

Parameters:

  • x [Number] — the x-coordinate used to pinpoint the item
  • y [Number] — the y-coordinate used to pinpoint the item

Returns:

  • [HTMLElement or Null] — the nth menu-item element, or null if not found

locate(x, y) → Integer or Null

Parameters:

  • x [Number] — the x-coordinate used to pinpoint the item
  • y [Number] — the y-coordinate used to pinpoint the item

Returns:

  • [Integer or Null] — the index into the menu-pane where the element is, or null if not found

shortcutValue(shortcut) → String

Parameters:

  • shortcut [String] — the value of a menu-item's shortcut

Returns:

  • [String] — the value of the 'value' attribute of the menu-item containing the given 'shortcut' attribute value

Class: WebFX.OverlayPane ⟼ <overlay-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
overlayPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <overlay-pane>

The overlayPane is used to manage modal-type operations for dialog boxes, popup menus and the like. Its primary purpose is to cover the entire web document / application at a high z-index and capture and forward mouse-click events, when applicable.

There are two modes: strict and non-strict. The former requires interaction with child elements, such as a dialog box's 'OK' button. The latter is looser and any click outside of any child elements will abort the whole operation. Popup menu operations are non-strict; a mouse-click outside of the menu acts as an escape from any choices.

This element also contains a menu handling subsystem that is used to properly manage popup menu operation.

This element, though not supported at this time, will also allow for "live tracking" operations, where children of this element will spawn events based on mouse movement and not require additional mouse clicks.

Constructor Registry

Item
Attributes
new WebFX.OverlayPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
active ↔ Boolean
-
closeHandler ↔ Function
-
strict ↔ Boolean
-
tracking ↔ Boolean
-

Method Registry

Item
Attributes
$nsMouseDownHandler(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.OverlayPane()

The overlay-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates sets the closeHandler property to null.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

active ↔ Boolean

This property is used to determine if the overlay-pane is in operation.

closeHandler ↔ Function

This property is used to store the closeHandler, a function called when the overlay-pane becomes inactive.

strict ↔ Boolean

This property is used to determine if the overlay-pane is operating in strict mode.

tracking ↔ Boolean

This property is used to determine if live tracking is being used.

Method Details

$nsMouseDownHandler(event)   <private>

In non-strict mode, this handler will abort the overlay-pane.

Parameters:

  • event [Object] — the mouse-down event

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'active': when set to false, the overlay-pane will detach itself and the closeHandler will be called - 'strict': this property will enable/disable the mouse-down event listeners for this element itself (enabled if false)

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>


disconnectedCallback()   <api>

This function removes the mouse-down and mouse-move event listeners.

Class: WebFX.PushButton ⟼ <push-button>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pushButton.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <push-button>

Push buttons are simple text-based do-something-on-click buttons with the added optional capability to handle on/off toggle operations.

Constructor Registry

Item
Attributes
new WebFX.PushButton()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
action ↔ Function
-
callback ↔ Function
-
disabled ↔ Boolean
-
hidden ↔ Boolean
-
label ↔ String
-
mo ↔ MutationObserver
<private>
svg ↔ String
-

Method Registry

Item
Attributes
$manageChildren()
<private>
$setContent()
<private>
$trigger(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disable()
-
disconnectedCallback()
<api>
enable()
-

Constructor Details

new WebFX.PushButton()

The push-button constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the MutationObserver to react to changes in push-button content.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

action ↔ Function

This property, set via code or the push-button's "action" attribute, is called in response to events.

callback ↔ Function

This property, set via code, is called in response to events prior to the push-button's action.

disabled ↔ Boolean

This property manages the push-button's ability to respond to events.

hidden ↔ Boolean

This property manages the push-button's visibility.

label ↔ String

This property manages the textual content representation of the push button, either set as an attribute or contained in the innerHTML.

mo ↔ MutationObserver   <private>

This internal property is used to track push-button content changes.

svg ↔ String

This property manages the SVG icon content representation of the push button.

Method Details

$manageChildren()   <private>

This private method is used to manage the button's text based on its type, state and multichoice selection.

$setContent()   <private>

This private method sets the content representation of the button.

$trigger(event)   <private>

This private method is used to conduct actions based on a successful mouse click or key down event.

Parameters:

  • event [Object] — the event received from the browser

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'disabled' attribute has changed, add/remove event listeners based on the new value.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the MutationObserver, sets the tabindex and enables the mouse event handlers.

disable()

Disables the button's ability to respond to events.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method disables the mouse event listeners and the MutationObserver.

enable()

Enables the button's ability to respond to events.

Class: WebFX.SelectButton ⟼ <select-button>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pushButton.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <select-button>

This type of button offers up a multiple-choice selection of values via a pop-up menu. Select buttons must take <option> tags as children.

Constructor Registry

Item
Attributes
new WebFX.SelectButton()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
action ↔ Function
-
disabled ↔ Boolean
-
hidden ↔ Boolean
-
option ↔ String
-
selected ↔ Integer
-

Method Registry

Item
Attributes
$manageChildren()
<private>
$trigger(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disable()
-
disconnectedCallback()
<api>
enable()
-
next()
-
previous()
-

Constructor Details

new WebFX.SelectButton()

The select-button constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the MutationObserver to react to changes in select-button content.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

action ↔ Function

This property, set via code or the push-button's "action" attribute, is called in response to events.

disabled ↔ Boolean

This property manages the push-button's ability to respond to events.

hidden ↔ Boolean

This property manages the push-button's visibility.

option ↔ String

This property manages the current selection of a multi-choice push-button by selecting an option based on its value.

selected ↔ Integer

This property manages the current selection of a multi-choice push-button by selecting an option based on its index.

Method Details

$manageChildren()   <private>

This private method is used to ensure that all children are option tags.

$trigger(event)   <private>

This private method is used to conduct actions based on a successful mouse click or key down event.

Parameters:

  • event [Object] — the event received from the browser

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'disabled' attribute has changed, add/remove event listeners based on the new value.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the MutationObserver, sets the tabindex and enables the mouse event handlers.

disable()

Disables the button's ability to respond to events.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method disables the mouse event listeners and the MutationObserver.

enable()

Enables the button's ability to respond to events.

next()

Sets the selected option to the next option

previous()

Sets the selected option to the previous option

Class: WebFX.SelectItem ⟼ <select-item>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
selectList.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <select-item>

Select items are selectable items within a select-list.

Constructor Registry

Item
Attributes
new WebFX.SelectItem()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
selected ↔ String
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.SelectItem()

The select-item constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

selected ↔ String

This property manages select-item's selected state.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings.

disconnectedCallback()   <api>

For this control, nothing happens when it is disconnected.

Class: WebFX.SelectList ⟼ <select-list>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
selectList.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <select-list>

Select lists are single-column grids with selectable content.

Constructor Registry

Item
Attributes
new WebFX.SelectList()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
callback ↔ Function
-
selections → Array<String>
<read-only>
stateless ↔ Boolean
-
upto ↔ String
-

Method Registry

Item
Attributes
$select(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
clear()
-
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.SelectList()

The select-list constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

callback ↔ Function

This property sets the selection callback function for interactive usage.

selections → Array<String>   <read-only>

This property gets the list of selections.

stateless ↔ Boolean

This property manages whether the select list's items manage their own state.

upto ↔ String

This property manages select-list's selection limit.

Method Details

$select(event)   <private>

This private method is used to select items in the select-list and save the selection values.

Parameters:

  • event [Object] — the event received from the browser

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'expand': change the select-list's expandability option

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

clear()

Clears the selections list

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings and sets the click event listener.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method removes the click event listener.

Class: WebFX.SliderControl ⟼ <slider-control>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
sliderControl.jsJavascriptKenneth F. GuerinCopyright © 2021-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <slider-control>

Slider controls are used to set numeric values between a set range.

Constructor Registry

Item
Attributes
new WebFX.SliderControl()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
clickAction ↔ String
-
clickAmount ↔ Number
-
indicatorType ↔ String
-
majorTicks ↔ Integer
-
minorTicks ↔ Integer
-
onchange ↔ Function
-
ondrag ↔ Function
-
snapToTicks ↔ Boolean
-
tickColor ↔ Color
-
tickStyle ↔ String
-
trackColor ↔ String
-
value ↔ Number
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.SliderControl()

The slider-control constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the ResizeObserver to react to changes in slider-control size and a MouseEventObserver to react to mouse events.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

clickAction ↔ String

This property manages the type of reaction to a click within the indicator track: { 'set','page' }.

clickAmount ↔ Number

This property manages the paging amount, in a value between 0.0 and 1.0, when clickAction is set to page and snapToTicks is false.

indicatorType ↔ String

This property manages the type of indicator: { 'round','cylinder','rsquare','rrect' }.

majorTicks ↔ Integer

This property manages the number of major ticks used / displayed.

minorTicks ↔ Integer

This property manages the number of minor ticks used / displayed between each major tick.

onchange ↔ Function

This property manages the current callback procedure that is called when the slider-control's value has changed.

ondrag ↔ Function

This property manages the current callback procedure that is called when the indicator is dragged.

snapToTicks ↔ Boolean

This property manages the reaction to clicks in the indicator track if there are ticks present.

tickColor ↔ Color

This property manages the color of the ticks used.

tickStyle ↔ String

This property manages the style of ticks used: { 'top-left','bottom-right','both' }.

trackColor ↔ String

This property manages the background color of the track.

value ↔ Number

This property manages the current value of the slider-control.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the ResizeObserver and MouseEventObserver.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method disables the ResizeObserver and MouseEventObserver.

Class: WebFX.SlidingPane ⟼ <sliding-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
slidingPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <sliding-pane>

Sliding panes are multi-pane layout controllers used to adjust the widths of each pane by allowing the user to slide an inter-pane border.

Constructor Registry

Item
Attributes
new WebFX.SlidingPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
sliderWidth ↔ Number
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.SlidingPane()

The sliding-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

sliderWidth ↔ Number

This property manages the width of the slider border.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'expand': change the vbox-pane's expandability option

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the observers.

disconnectedCallback()   <api>

For this control, the observers will be disconnected upon control disconnection.

Class: WebFX.StackablePane ⟼ <stackable-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
stackablePane.jsJavascriptKenneth F. GuerinCopyright © 2022-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <stackable-pane>

Stackable panes are single-column grids that are used to hold other elements.

Constructor Registry

Item
Attributes
new WebFX.StackablePane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.StackablePane()

The stackable-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings.

disconnectedCallback()   <api>

For this control, nothing happens when it is disconnected.

Class: WebFX.StateButton ⟼ <state-button>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pushButton.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <state-button>

State buttons are used to transition through a given set of states. State buttons must take <state> tags as children.

Constructor Registry

Item
Attributes
new WebFX.StateButton()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
action ↔ Function
-
disabled ↔ Boolean
-
hidden ↔ Boolean
-
value ↔ String
-

Method Registry

Item
Attributes
$manageChildren()
<private>
$trigger(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disable()
-
disconnectedCallback()
<api>
enable()
-
next(force)
-
reset(trigger)
-

Constructor Details

new WebFX.StateButton()

The state-button constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the MutationObserver to react to changes in state-button content.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

action ↔ Function

This property, set via code or the push-button's "action" attribute, is called in response to events.

disabled ↔ Boolean

This property manages the push-button's ability to respond to events.

hidden ↔ Boolean

This property manages the push-button's visibility.

value ↔ String

This property manages the current selection of a multi-choice push-button by selecting an option based on its value.

Method Details

$manageChildren()   <private>

This private method is used to manage the button's text based on its type, state and multichoice selection.

$trigger(event)   <private>

This private method transitions the state button to the next state

Parameters:

  • event [Object] — the event received from the browser

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'disabled' attribute has changed, add/remove event listeners based on the new value.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the MutationObserver, sets the tabindex and enables the mouse event handlers.

disable()

Disables the button's ability to respond to events.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method disables the mouse event listeners and the MutationObserver.

enable()

Enables the button's ability to respond to events.

next(force)

Increments the state

Parameters:

  • force [Boolean] — if true, forces a trigger action even if the value doesn't change (single-state) <default: false>

reset(trigger)

Increments the state

Parameters:

  • trigger [Boolean] — if true, forces a trigger action <default: false>

Class: WebFX.SvgFactory

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
svgPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains a drawing registry used by the svg-pane element and its derivatives.

This factory is a drawing method registry used by svg-pane and its derivatives.

Constructor Registry

Item
Attributes
new WebFX.SvgFactory()
-

Method Registry

Item
Attributes
$alertCircleIconFactory() → String
<private>
$alertIconFactory() → String
<private>
$alertRingIconFactory() → String
<private>
$backstepIconFactory() → String
<private>
$calendarIconFactory() → String
<private>
$checkmarkIconFactory() → String
<private>
$circleIconFactory() → String
<private>
$closeIconFactory() → String
<private>
$cloudDownloadIconFactory() → String
<private>
$cloudIconFactory() → String
<private>
$cloudUploadIconFactory() → String
<private>
$diamondIconFactory() → String
<private>
$downArrowIconFactory() → String
<private>
$downTriangleIconFactory() → String
<private>
$fileIconFactory() → String
<private>
$fileViewIconFactory() → String
<private>
$folderIconFactory() → String
<private>
$fwdstepIconFactory() → String
<private>
$gearIconFactory() → String
<private>
$hamburgerIconFactory() → String
<private>
$hexagonIconFactory() → String
<private>
$hollowCircleIconFactory() → String
<private>
$hollowDiamondIconFactory() → String
<private>
$hollowDownTriangleIconFactory() → String
<private>
$hollowHexagonIconFactory() → String
<private>
$hollowLeftTriangleIconFactory() → String
<private>
$hollowOctagonIconFactory() → String
<private>
$hollowRightTriangleIconFactory() → String
<private>
$hollowRsquareIconFactory() → String
<private>
$hollowSquareIconFactory() → String
<private>
$hollowUpTriangleIconFactory() → String
<private>
$homeIconFactory() → String
<private>
$infoCircleIconFactory() → String
<private>
$infoIconFactory() → String
<private>
$infoRingIconFactory() → String
<private>
$installDefaults()
<private>
$leftArrowIconFactory() → String
<private>
$leftTriangleIconFactory() → String
<private>
$loginIconFactory() → String
<private>
$logoutIconFactory() → String
<private>
$minusIconFactory() → String
<private>
$octagonIconFactory() → String
<private>
$opacityMenuIconFactory() → String
<private>
$opaqueIconFactory() → String
<private>
$pauseIconFactory() → String
<private>
$pencilIconFactory() → String
<private>
$plusIconFactory() → String
<private>
$powerIconFactory() → String
<private>
$pushpinIconFactory() → String
<private>
$questionCircleIconFactory() → String
<private>
$questionIconFactory() → String
<private>
$questionRingIconFactory() → String
<private>
$redoArrowIconFactory() → String
<private>
$refreshArrowIconFactory() → String
<private>
$rightArrowIconFactory() → String
<private>
$rightTriangleIconFactory() → String
<private>
$rsquareIconFactory() → String
<private>
$saveIconFactory() → String
<private>
$searchIconFactory() → String
<private>
$squareIconFactory() → String
<private>
$swapArrowsIconFactory() → String
<private>
$thinDownArrowIconFactory() → String
<private>
$thinLeftArrowIconFactory() → String
<private>
$thinRedoArrowIconFactory() → String
<private>
$thinRefreshArrowIconFactory() → String
<private>
$thinRightArrowIconFactory() → String
<private>
$thinSwapArrowsIconFactory() → String
<private>
$thinUndoArrowIconFactory() → String
<private>
$thinUpArrowIconFactory() → String
<private>
$toggleDownIconFactory() → String
<private>
$toggleIndentIconFactory() → String
<private>
$toggleRightIconFactory() → String
<private>
$translucentIconFactory() → String
<private>
$transparentIconFactory() → String
<private>
$trashCanIconFactory() → String
<private>
$undoArrowIconFactory() → String
<private>
$upArrowIconFactory() → String
<private>
$upTriangleIconFactory() → String
<private>
$userIconFactory() → String
<private>
$viewIconFactory() → String
<private>
$zoomInIconFactory() → String
<private>
$zoomMenuDownIconFactory() → String
<private>
$zoomMenuRightIconFactory() → String
<private>
$zoomOutIconFactory() → String
<private>
draw()
-
install(name, proc)
-
is_installed(name) → Boolean
-

Constructor Details

new WebFX.SvgFactory()

The constructor creates the registry and installs the default factories.

Method Details

$alertCircleIconFactory() → String   <private>

This private method builds the alert circle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the alert circle icon

$alertIconFactory() → String   <private>

This private method builds the alert icon using a path element.

Returns:

  • [String] — the SVG paths comprising the alert icon

$alertRingIconFactory() → String   <private>

This private method builds the alert ring icon using a path element.

Returns:

  • [String] — the SVG paths comprising the alert ring icon

$backstepIconFactory() → String   <private>

This private method builds the back step icon using a path element.

Returns:

  • [String] — the SVG paths comprising the back step icon

$calendarIconFactory() → String   <private>

This private method builds the calendar icon using a path element.

Returns:

  • [String] — the SVG paths comprising the calendar icon

$checkmarkIconFactory() → String   <private>

This private method builds the checkmark icon using a path element.

Returns:

  • [String] — the SVG paths comprising the checkmark icon

$circleIconFactory() → String   <private>

This private method builds the circle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the circle icon

$closeIconFactory() → String   <private>

This private method builds the close icon using a path element.

Returns:

  • [String] — the SVG paths comprising the close icon

$cloudDownloadIconFactory() → String   <private>

This private method builds the cloud download icon using a path element.

Returns:

  • [String] — the SVG paths comprising the cloud download icon

$cloudIconFactory() → String   <private>

This private method builds the cloud icon using a path element.

Returns:

  • [String] — the SVG paths comprising the cloud icon

$cloudUploadIconFactory() → String   <private>

This private method builds the cloud upload icon using a path element.

Returns:

  • [String] — the SVG paths comprising the cloud upload icon

$diamondIconFactory() → String   <private>

This private method builds the diamond icon using a path element.

Returns:

  • [String] — the SVG paths comprising the diamond icon

$downArrowIconFactory() → String   <private>

This private method builds the down arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the down arrow icon

$downTriangleIconFactory() → String   <private>

This private method builds the down triangle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the down triangle icon

$fileIconFactory() → String   <private>

This private method builds the file icon using a path element.

Returns:

  • [String] — the SVG paths comprising the file icon

$fileViewIconFactory() → String   <private>

This private method builds the file view icon using a path element.

Returns:

  • [String] — the SVG paths comprising the file view icon

$folderIconFactory() → String   <private>

This private method builds the folder icon using a path element.

Returns:

  • [String] — the SVG paths comprising the folder icon

$fwdstepIconFactory() → String   <private>

This private method builds the forward step icon using a path element.

Returns:

  • [String] — the SVG paths comprising the forward step icon

$gearIconFactory() → String   <private>

This private method builds the gear icon using a path element.

Returns:

  • [String] — the SVG paths comprising the gear icon

$hamburgerIconFactory() → String   <private>

This private method builds the hamburger icon using a multi-segment path element.

Returns:

  • [String] — the SVG paths comprising the hamburger icon

$hexagonIconFactory() → String   <private>

This private method builds the hexagon icon using a path element.

Returns:

  • [String] — the SVG paths comprising the hexagon icon

$hollowCircleIconFactory() → String   <private>

This private method builds the hollow circle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the hollow circle icon

$hollowDiamondIconFactory() → String   <private>

This private method builds the hollow diamond icon using a path element.

Returns:

  • [String] — the SVG paths comprising the hollow diamond icon

$hollowDownTriangleIconFactory() → String   <private>

This private method builds the down triangle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the down triangle icon

$hollowHexagonIconFactory() → String   <private>

This private method builds the hollow hexagon icon using a path element.

Returns:

  • [String] — the SVG paths comprising the hollow hexagon icon

$hollowLeftTriangleIconFactory() → String   <private>

This private method builds the hollow left triangle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the hollow left triangle icon

$hollowOctagonIconFactory() → String   <private>

This private method builds the hollow octagon icon using a path element.

Returns:

  • [String] — the SVG paths comprising the hollow octagon icon

$hollowRightTriangleIconFactory() → String   <private>

This private method builds the right triangle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the right triangle icon

$hollowRsquareIconFactory() → String   <private>

This private method builds the hollow rsquare icon using a path element.

Returns:

  • [String] — the SVG paths comprising the hollow rsquare icon

$hollowSquareIconFactory() → String   <private>

This private method builds the hollow square icon using a path element.

Returns:

  • [String] — the SVG paths comprising the hollow square icon

$hollowUpTriangleIconFactory() → String   <private>

This private method builds the up triangle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the up triangle icon

$homeIconFactory() → String   <private>

This private method builds the home icon using a path element.

Returns:

  • [String] — the SVG paths comprising the home icon

$infoCircleIconFactory() → String   <private>

This private method builds the info circle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the info circle icon

$infoIconFactory() → String   <private>

This private method builds the info icon using a path element.

Returns:

  • [String] — the SVG paths comprising the info icon

$infoRingIconFactory() → String   <private>

This private method builds the info ring icon using a path element.

Returns:

  • [String] — the SVG paths comprising the info ring icon

$installDefaults()   <private>


$leftArrowIconFactory() → String   <private>

This private method builds the left arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the left arrow icon

$leftTriangleIconFactory() → String   <private>

This private method builds the left triangle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the left triangle icon

$loginIconFactory() → String   <private>

This private method builds the login icon using a path element.

Returns:

  • [String] — the SVG paths comprising the login icon

$logoutIconFactory() → String   <private>

This private method builds the logout icon using a path element.

Returns:

  • [String] — the SVG paths comprising the logout icon

$minusIconFactory() → String   <private>

This private method builds the minus icon using a path element.

Returns:

  • [String] — the SVG paths comprising the minus icon

$octagonIconFactory() → String   <private>

This private method builds the octagon icon using a path element.

Returns:

  • [String] — the SVG paths comprising the octagon icon

$opacityMenuIconFactory() → String   <private>

This private method builds the opacity menu icon using a path element.

Returns:

  • [String] — the SVG paths comprising the opacity menu icon

$opaqueIconFactory() → String   <private>

This private method builds the opaque icon using a path element.

Returns:

  • [String] — the SVG paths comprising the opaque icon

$pauseIconFactory() → String   <private>

This private method builds the pause icon using a path element.

Returns:

  • [String] — the SVG paths comprising the pause icon

$pencilIconFactory() → String   <private>

This private method builds the pencil icon using a path element.

Returns:

  • [String] — the SVG paths comprising the pencil icon

$plusIconFactory() → String   <private>

This private method builds the plus icon using a path element.

Returns:

  • [String] — the SVG paths comprising the plus icon

$powerIconFactory() → String   <private>

This private method builds the power icon using a path element.

Returns:

  • [String] — the SVG paths comprising the power icon

$pushpinIconFactory() → String   <private>

This private method builds the push pin icon using a path element.

Returns:

  • [String] — the SVG paths comprising the push pin icon

$questionCircleIconFactory() → String   <private>

This private method builds the question circle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the question circle icon

$questionIconFactory() → String   <private>

This private method builds the question icon using a path element.

Returns:

  • [String] — the SVG paths comprising the question icon

$questionRingIconFactory() → String   <private>

This private method builds the question ring icon using a path element.

Returns:

  • [String] — the SVG paths comprising the question ring icon

$redoArrowIconFactory() → String   <private>

This private method builds the redo arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the redo arrow icon

$refreshArrowIconFactory() → String   <private>

This private method builds the refresh arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the refresh arrow icon

$rightArrowIconFactory() → String   <private>

This private method builds the right arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the right arrow icon

$rightTriangleIconFactory() → String   <private>

This private method builds the right triangle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the right triangle icon

$rsquareIconFactory() → String   <private>

This private method builds the rsquare icon using a path element.

Returns:

  • [String] — the SVG paths comprising the rsquare icon

$saveIconFactory() → String   <private>

This private method builds the save icon using a path element.

Returns:

  • [String] — the SVG paths comprising the save icon

$searchIconFactory() → String   <private>

This private method builds the search icon using a path element.

Returns:

  • [String] — the SVG paths comprising the search icon

$squareIconFactory() → String   <private>

This private method builds the square icon using a path element.

Returns:

  • [String] — the SVG paths comprising the square icon

$swapArrowsIconFactory() → String   <private>

This private method builds the swap arrows icon using a path element.

Returns:

  • [String] — the SVG paths comprising the swap arrows icon

$thinDownArrowIconFactory() → String   <private>

This private method builds the thin down arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the thin down arrow icon

$thinLeftArrowIconFactory() → String   <private>

This private method builds the thin left arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the thin left arrow icon

$thinRedoArrowIconFactory() → String   <private>

This private method builds the thin redo arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the thin redo arrow icon

$thinRefreshArrowIconFactory() → String   <private>

This private method builds the thin refresh arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the thin refresh arrow icon

$thinRightArrowIconFactory() → String   <private>

This private method builds the thin right arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the thin right arrow icon

$thinSwapArrowsIconFactory() → String   <private>

This private method builds the thin swap arrows icon using a path element.

Returns:

  • [String] — the SVG paths comprising the thin swap arrows icon

$thinUndoArrowIconFactory() → String   <private>

This private method builds the thin undo arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the thin undo arrow icon

$thinUpArrowIconFactory() → String   <private>

This private method builds the thin up arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the thin up arrow icon

$toggleDownIconFactory() → String   <private>

This private method builds the toggle down icon using a path element.

Returns:

  • [String] — the SVG paths comprising the toggle down icon

$toggleIndentIconFactory() → String   <private>

This private method builds the toggle indent icon using a path element.

Returns:

  • [String] — the SVG paths comprising the toggle indent icon

$toggleRightIconFactory() → String   <private>

This private method builds the toggle right icon using a path element.

Returns:

  • [String] — the SVG paths comprising the toggle right icon

$translucentIconFactory() → String   <private>

This private method builds the translucent icon using a path element.

Returns:

  • [String] — the SVG paths comprising the translucent icon

$transparentIconFactory() → String   <private>

This private method builds the transparent icon using a path element.

Returns:

  • [String] — the SVG paths comprising the transparent icon

$trashCanIconFactory() → String   <private>

This private method builds the trash can icon using a path element.

Returns:

  • [String] — the SVG paths comprising the trash can icon

$undoArrowIconFactory() → String   <private>

This private method builds the undo arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the undo arrow icon

$upArrowIconFactory() → String   <private>

This private method builds the up arrow icon using a path element.

Returns:

  • [String] — the SVG paths comprising the up arrow icon

$upTriangleIconFactory() → String   <private>

This private method builds the up triangle icon using a path element.

Returns:

  • [String] — the SVG paths comprising the up triangle icon

$userIconFactory() → String   <private>

This private method builds the user icon using a path element.

Returns:

  • [String] — the SVG paths comprising the user icon

$viewIconFactory() → String   <private>

This private method builds the view icon using a path element.

Returns:

  • [String] — the SVG paths comprising the view icon

$zoomInIconFactory() → String   <private>

This private method builds the zoom in icon using a path element.

Returns:

  • [String] — the SVG paths comprising the zoom in icon

$zoomMenuDownIconFactory() → String   <private>

This private method builds the zoom menu icon using a path element.

Returns:

  • [String] — the SVG paths comprising the zoom menu icon

$zoomMenuRightIconFactory() → String   <private>

This private method builds the zoom menu icon using a path element.

Returns:

  • [String] — the SVG paths comprising the zoom menu icon

$zoomOutIconFactory() → String   <private>

This private method builds the zoom out icon using a path element.

Returns:

  • [String] — the SVG paths comprising the zoom out icon

draw()


install(name, proc)

This method is used to install a drawing procedure into the factory.

Parameters:

  • name [String] — the name of the drawing procedure
  • proc [Function] — the drawing procedure to run

is_installed(name) → Boolean

This method is used to determine if a drawing procedure has been installed

Parameters:

  • name [String] — the name of the drawing procedure

Returns:

  • [Boolean] — true, if there is a drawing procedure registered under the give name

Class: WebFX.SvgIcon ⟼ <svg-icon>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
svgPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <svg-icon>

The svg-icon is a collection of useful icons. It is implemented as an extension of svg-pane using the pane's factory property to handle the drawing function.

Constructor Registry

Item
Attributes
new WebFX.SvgIcon()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
baseType ↔ String
-
iconType ↔ String
-

Method Registry

Item
Attributes
$redrawPane()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.SvgIcon()

The svg-icon constructor executes the svg-pane's constructor and nothing else.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

baseType ↔ String

This property sets the base type.

iconType ↔ String

This property sets the icon type.

Method Details

$redrawPane()   <private>

This method will redraw the embedded SVG based either on the factory property or on the 'draw' attibute or 'draw' callback.

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'icon' attribute changes, the icon will change.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets the svg-pane's factory property to handle drawing operations.

disconnectedCallback()   <api>

Mark the element as disconnected.

Class: WebFX.SvgPane ⟼ <svg-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
svgPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <svg-pane>

An svg-pane encapsulates an SVG image.

Constructor Registry

Item
Attributes
new WebFX.SvgPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
drawProc ↔ Function
-
factory ↔ Function
-

Method Registry

Item
Attributes
$redrawPane()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.SvgPane()

The svg-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

drawProc ↔ Function

This property, set via the svg-pane's "draw" attribute, is called in response to drawing events.

factory ↔ Function

This property, set directly via JS code, is called in response to drawing events instead of the drawProc.

Method Details

$redrawPane()   <private>

This method will redraw the embedded SVG based either on the factory property or on the 'draw' attibute or 'draw' callback.

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'draw' attribute changes, the embedded SVG element will be replaced.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets the element's drawProc.

disconnectedCallback()   <api>

When this element is disconnected, the drawProc is removed.

Class: WebFX.TabPane ⟼ <tab-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
tabPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <tab-pane>

Constructor Registry

Item
Attributes
new WebFX.TabPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
add_button ↔ Boolean or String
-
add_icon ↔ Boolean or String
-
close_icon ↔ Boolean or String
-
icon_style ↔ String
-
onadd ↔ Null or Functions or String
-
onclose ↔ Null or Functions or String
-
style ↔ String
-

Method Registry

Item
Attributes
$addAddButton()
<private>
$deactivate()
<private>
$loadSelector(slot, selectorText, closable)
<private>
$removeAddButton()
<private>
$trigger(event)
<private>
$updateScrollability(scrolling)
<private>
activateNthSlot(nth)
-
activateSlot(slotElement)
-
attributeChangedCallback(name, oldValue, newValue)
<api>
closeNthSlot(nth)
-
closeSlot(slotElement)
-
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.TabPane()

The tab-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

add_button ↔ Boolean or String

This property determines whether the tab pane contains and add button.

add_icon ↔ Boolean or String

This property determines the style of the add button on tab panes with add buttons.

close_icon ↔ Boolean or String

This property determines the style of the close icon on closable tab panes.

icon_style ↔ String

This property determines the style of close and add icons.

onadd ↔ Null or Functions or String

This property determines a callback function to call when the add button is clicked.

onclose ↔ Null or Functions or String

This property determines a callback function to call when a tab pane is closed

style ↔ String

This property determines the look & feel of the tab-selectors. Valid values are 'top-tabs', 'top-buttons', 'top-cbuttons', 'bottom-tabs', 'bottom-buttons', 'bottom-cbuttons', 'left-tabs', 'left-buttons', 'left-cbuttons', 'right-tabs', 'right-buttons', 'right-cbuttons'.

Method Details

$addAddButton()   <private>


$deactivate()   <private>

This private method is used to deactivate the current active tab-slot.

$loadSelector(slot, selectorText, closable)   <private>

This private method is used to attach a tab-slot to the tab-pane by creating its associated tab-selector.

Parameters:

  • slot [HTMLElement] — the tab-slot to attach to the tab-pane
  • selectorText [String] — the string to load into the tab-selector
  • closable [Boolean] — the flag which specifies whether a close icon will be part of the tab-selector or not

$removeAddButton()   <private>


$trigger(event)   <private>

This private method is used to conduct actions based on a successful mouse click on an tab-selector. The method will determine which tab-slot is associated with the tab-selector that was clicked.

Parameters:

  • event [Object] — the event received from the browser

$updateScrollability(scrolling)   <private>

This private method is used to update the tab-content based on the active tab-slot's scrollability.

Parameters:

  • scrolling [String] — the scrolling direction

activateNthSlot(nth)

This method is used to activate a particular tab-slot.

Parameters:

  • nth [Integer] — the nth tab-slot child to activate

activateSlot(slotElement)

This method is used to activate a particular tab-slot.

Parameters:

  • slotElement [HTMLElement] — the tab-slot element to activate

attributeChangedCallback(name, oldValue, newValue)   <api>

When the tab-style attribute is changed, the tab-pane will change its tab-selectors from one style to another.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

closeNthSlot(nth)

This method is used to close a particular tab-slot.

Parameters:

  • nth [Integer] — the nth tab-slot child to close

closeSlot(slotElement)

This method is used to close a particular tab-slot.

Parameters:

  • slotElement [HTMLElement] — the tab-slot element to close

connectedCallback()   <api>

Upon connection to the DOM, this method sets the default tab-style to 'tabs' and sets the mouse-click event listener.

disconnectedCallback()   <api>

Upon connection to the DOM, this method removes the mouse-click event listener.

Class: WebFX.TabSelector ⟼ <tab-selector>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
tabPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <tab-selector>

A tab-selector is used with a tab-pane's shadow DOM in order to allow the user to expand / contract the tab-pane.

Constructor Registry

Item
Attributes
new WebFX.TabSelector()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
active ↔ Boolean
-

Method Registry

Item
Attributes
$updateContents()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>
getCloseIcon() → String or Null
-
setCloseIcon(icon_style)
-
setContents(heading, icon_style)
-
setHeading(heading)
-

Constructor Details

new WebFX.TabSelector()

The tab-selector constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

active ↔ Boolean

This property determines whether the tab-selector is in the active state or not.

Method Details

$updateContents()   <private>

This method is used to update the contents of the selector.

attributeChangedCallback(name, oldValue, newValue)   <api>

For this control, nothing happens when an attribute is changed. The CSS handles look & feel changes.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings.

disconnectedCallback()   <api>

For this control, nothing happens when it is disconnected.

getCloseIcon() → String or Null

This method is used to get the close icon of the selector.

Returns:

  • [String or Null] — the type if icon to use for a closable icon, null if not closable

setCloseIcon(icon_style)

This method is used to set the close icon of the selector.

Parameters:

  • icon_style [String or Null] — the type if icon to use for a closable icon, null if not closable <default: null>

setContents(heading, icon_style)

This method is used to set the inner contents of the selector.

Parameters:

  • heading [String] — the string used to display in the selector tab
  • icon_style [String or Null] — the type if icon to use for a closable icon, null if not closable <default: null>

setHeading(heading)

This method is used to set the heading of the selector.

Parameters:

  • heading [String] — the string used to display in the selector tab

Class: WebFX.TabSlot ⟼ <tab-slot>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
tabPane.jsJavascriptKenneth F. GuerinCopyright © 2021-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <tab-slot>

A tab-slot is used to define the contents of each block of information within an tab-pane.

Constructor Registry

Item
Attributes
new WebFX.TabSlot()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
active ↔ Boolean
-
closable ↔ Boolean
-
heading ↔ String
-
scrolling ↔ String
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.TabSlot()

The tab-slot constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

active ↔ Boolean

This property determines whether the associated tab-selector is in the active state or not.

closable ↔ Boolean

This property determines whether the tab-slot's tab-selector will have a close icon or not.

heading ↔ String

This property sets the value of the associated tab-selector in the shadow DOM.

scrolling ↔ String

This property determines whether the slot's content is scrollable: none, vertical, horizontal, both.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'heading': change the tab-selector's value based on the new heading value - 'active': show/hide the tab-pane's contents and update the tab-selector's active state - 'closable': change whether the tab-slot's tab-selector will have a close icon

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method sets default attribute settings and adds the private $trigger event listener.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method removes event listeners.

Class: WebFX.ToggleButton ⟼ <toggle-button>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pushButton.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <toggle-button>

Toggle buttons are used to transition between two states, showing on/off via an indicator.

Constructor Registry

Item
Attributes
new WebFX.ToggleButton()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
action ↔ Function
-
disabled ↔ Boolean
-
hidden ↔ Boolean
-

Method Registry

Item
Attributes
$manageChildren()
<private>
$trigger(event)
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disable()
-
disconnectedCallback()
<api>
enable()
-
off()
-
on()
-
tap()
-

Constructor Details

new WebFX.ToggleButton()

The push-button constructor executes the usual custom HTML initialization procedure by creating the shadow DOM. It also creates the MutationObserver to react to changes in push-button content.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

action ↔ Function

This property, set via code or the toggle-button's "action" attribute, is called in response to events.

disabled ↔ Boolean

This property manages the push-button's ability to respond to events.

hidden ↔ Boolean

This property manages the push-button's visibility.

Method Details

$manageChildren()   <private>

This private method is used to manage the button's text based on its type, state and multichoice selection.

$trigger(event)   <private>

This private method is used to conduct actions based on a successful mouse click or key down event.

Parameters:

  • event [Object] — the event received from the browser

attributeChangedCallback(name, oldValue, newValue)   <api>

When the 'disabled' attribute has changed, add/remove event listeners based on the new value.

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the MutationObserver, sets the tabindex and enables the mouse event handlers.

disable()

Disables the button's ability to respond to events.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method disables the mouse event listeners and the MutationObserver.

enable()

Enables the button's ability to respond to events.

off()

This method toggles sets the toggle state to off.

on()

This method toggles sets the toggle state to on.

tap()

This method toggles the on/off state of a toggle button.

Class: WebFX.TreeListPane ⟼ <tree-list-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
treeListPane.jsJavascriptKenneth F. GuerinCopyright © 2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <tree-list-pane>

TreeListPanes are grid-like display containers containing one or more expandable TreeListItems.

Constructor Registry

Item
Attributes
new WebFX.TreeListPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
caption ↔ String
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.TreeListPane()

The grid-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

caption ↔ String

This property manages the tree list's caption.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method configures the grid-pane's layout.

disconnectedCallback()   <api>


Class: WebFX.VBoxPane ⟼ <vbox-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
vboxPane.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <vbox-pane>

VBox panes are single-column grids that are used to hold other elements.

Constructor Registry

Item
Attributes
new WebFX.VBoxPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
expand ↔ String
-
scrolling ↔ String
-

Method Registry

Item
Attributes
$setExpansion()
<private>
$setScrolling()
<private>
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.VBoxPane()

The vbox-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

expand ↔ String

This property manages vbox-pane's expandability options.

scrolling ↔ String

This property determines whether the vbox-pane's content is scrollable: none, vertical, horizontal, both.

Method Details

$setExpansion()   <private>

This method is used to set the expansion capability / layout of the control.

$setScrolling()   <private>

This method is used to set the scrolling capability / layout of the control.

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'expand': change the vbox-pane's expandability option

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the MutationObserver

disconnectedCallback()   <api>

Upon disconnection to the DOM, this method disables the MutationObserver

Class: WebFX.WindowPane ⟼ <window-pane>

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
windowPane.jsJavascriptKenneth F. GuerinCopyright © 2023-2024 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains the implementation of the WebFX element: <window-pane>

Window panes are free-floating panes tied to a parent's visible area.

Constructor Registry

Item
Attributes
new WebFX.WindowPane()
-

Class Property Registry

Item
Attributes
observedAttributes ↔ Array<String>
<api>

Property Registry

Item
Attributes
closable ↔ Boolean
-
onfloat ↔ String or Function
-
onmove ↔ String or Function
-
onresize ↔ String or Function
-
resizable ↔ Boolean
-
title ↔ String
-
title-background ↔ String
-
title-color ↔ String
-
title-font ↔ String
-

Method Registry

Item
Attributes
attributeChangedCallback(name, oldValue, newValue)
<api>
connectedCallback()
<api>
disconnectedCallback()
<api>

Constructor Details

new WebFX.WindowPane()

The window-pane constructor executes the usual custom HTML initialization procedure by creating the shadow DOM.

Class Property Details

observedAttributes ↔ Array<String>   <api>

This property lists the attributes that are managed as properties by this class.

Property Details

closable ↔ Boolean

This property manages window-pane's ability to close itself.

onfloat ↔ String or Function

This property sets a procedure to be called when the window-pane is floated to the top

onmove ↔ String or Function

This property sets a procedure to be called when the window-pane is moved

onresize ↔ String or Function

This property sets a procedure to be called when the window-pane is resized

resizable ↔ Boolean

This property manages window-pane's ability to resize itself.

title ↔ String

This property manages window-pane's title string.

title-background ↔ String

This property manages window-pane's banner background.

title-color ↔ String

This property manages window-pane's banner color.

title-font ↔ String

This property manages window-pane's banner font.

Method Details

attributeChangedCallback(name, oldValue, newValue)   <api>

When the following attribute values change: - 'closable': change the window-pane's closability option - 'resizable': change the window-pane's resizability option - 'mode': change the window-pane's positioning mode (absolute or relative) - 'title': change the window-pane's title - 'banner-background': change the window-pane's banner background - 'banner-color': change the window-pane's banner color

Parameters:

  • name [String] — the name of the attribute which has changed
  • oldValue [Value] — the original value of the changed attribute
  • newValue [Value] — the new value of the changed attribute

connectedCallback()   <api>

Upon connection to the DOM, this method enables the MouseEventObserver.

disconnectedCallback()   <api>

Upon disconnection from the DOM, this method disables the MouseEventObserver.

Class: WebFX$CommonButtonEnvironment

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
pushButton.jsJavascriptKenneth F. GuerinCopyright © 2020-2025 Brick Mill Games, LLC, All rights reserved.

Overview

This module contains all of the common event listeners.

The various types of buttons supported by WebFX contain several common data and functional elements. This class contains the necessary common css styling and html template body as well as the common mount event handling logic, disabled states and the MutationObserver.

Constructor Registry

Item
Attributes
new WebFX$CommonButtonEnvironment()
-

Property Registry

Item
Attributes
button ↔ HTMLElement
-
content ↔ String
-
css ↔ String
-
disabled ↔ Boolean
-
hidden ↔ Boolean
-
html ↔ String
-

Method Registry

Item
Attributes
$connectMouseEventListeners()
<private>
$disconnectMouseEventListeners()
<private>
$keyDownHandler(event)
<private>
$mouseDownHandler(event)
<private>
$mouseOutHandler()
<private>
$mouseOverHandler(event)
<private>
$mouseUpHandler()
<private>
$preventDefault(event)
<private>
$trigger(event)
<private>
connect()
-
disconnect()
-
getContent() → String
-
setContent(content)
-

Constructor Details

new WebFX$CommonButtonEnvironment()

The constructor for the common button support creates the common css and html template strings used by all buttons.

Property Details

button ↔ HTMLElement

This property returns the button being managed.

content ↔ String

This property manages the button's content representation.

css ↔ String

This property returns the button css styling string.

disabled ↔ Boolean

This property manages the disabled state of the button and the associated mouse events.

hidden ↔ Boolean

This property manages the push-button's visibility.

html ↔ String

This property returns the HTML template body.

Method Details

$connectMouseEventListeners()   <private>

Connects the standard mouse event listeners to the button element.

$disconnectMouseEventListeners()   <private>

Disconnects the standard mouse event listeners from the button element.

$keyDownHandler(event)   <private>

This private method handles key-down events and triggers the button's actions if the key was the 'Enter' key and the button had focus.

Parameters:

  • event [Object] — the event received from the browser

$mouseDownHandler(event)   <private>

This private method puts the button in pressing mode when the left mouse button is pressed inside the button It uses the 'has-pressed' and 'pressing' attributes to manage its "being pressed" state. 'has-pressed' is used to note that the process has begun. 'pressing' is used for UI feedback.

Parameters:

  • event [Object] — the event received from the browser

$mouseOutHandler()   <private>

This private method handles mouse out events while the push-button is being pressed. A drag of the mouse outside of the push-button while the mouse button is still pressed will modify the push-button's appearance and a release outside of the push-button will not trigger the push-button's action.

$mouseOverHandler(event)   <private>

This private method handles mouse over events after the push-button has been pressed. It can reset itself if the mouse button has been released outside of the push-button itself.

Parameters:

  • event [Object] — the event received from the browser

$mouseUpHandler()   <private>

This private method ejects the button from pressing mode when the left mouse button is released.

$preventDefault(event)   <private>

This private method is used to signify to the browser's event machinery that we've captured and processed the event.

Parameters:

  • event [Object] — the event received from the browser

$trigger(event)   <private>

This private method is used to trigger the button element's action via its $trigger call.

Parameters:

  • event [Object] — the event received from the browser

connect()

This method connects the mutation observer and standard mouse event listeners to the button element.

disconnect()

This method disconnects the mutation obserer and the standard mouse event listeners from the button element.

getContent() → String

This method gets the button's internal content representation.

Returns:

  • [String] — the button's content representation.

setContent(content)

This method sets the button's internal content representation.

Parameters:

  • content [String] — the string to place within the button, which could be an HTML snippet

This documentation page was generated by the Codoc gem on 04-Nov-2025 at 12:06:37.
File Documentation Page
Overview
xapi (library)
xapi.AJAX (namespace)
xapi.AppLoader (namespace)
xapi.ArgumentError ( ← Error)
xapi.ResLoader (namespace)
xapi.RuntimeError ( ← Error)

Overview

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
sampleAppLoader.jsJavascriptKenneth F. GuerinCopyright © 2024, Brick Mill Games, LLC, all rights reserved.
xapi.jsJavascriptKenneth F. GuerinCopyright © 2020-2025, Brick Mill Games, LLC. All rights reserved.

Contents Directory

Objects
L xapi
N xapi.AJAX
N xapi.AppLoader
C xapi.ArgumentError ← Error
N xapi.ResLoader
C xapi.RuntimeError ← Error
Constants & Methods
• Array.each (xapi)
• Array.first (xapi)
• Array.last (xapi)
• Array.removeIf (xapi)
• CustomElementRegistry.extends (xapi)
• CustomElementRegistry.getClass (xapi)
• CustomElementRegistry.register (xapi)
• Document.createElementWithAttributes (xapi)
• Document.findStylesheet (xapi)
• Document.htmlToElement (xapi)
• Document.loadImage (xapi)
• Document.qcfirst (xapi)
• Document.qchildren (xapi)
• Document.qclass (xapi)
• Document.qid (xapi)
• Document.qsall (xapi)
• Document.qsel (xapi)
• Document.qsfirst (xapi)
• Document.qslast (xapi)
• Document.qtag (xapi)
• Document.qxy (xapi)
• Document.walkElements (xapi)
• Element.fqname (xapi)
• Element.qcfirst (xapi)
• Element.qchildren (xapi)
• Element.qclass (xapi)
• Element.qid (xapi)
• Element.qparent (xapi)
• Element.qsall (xapi)
• Element.qsel (xapi)
• Element.qsfirst (xapi)
• Element.qtag (xapi)
• Element.walkElements (xapi)
• Element.where (xapi)
• HTMLElement.appendHTML (xapi)
• HTMLElement.detach (xapi)
• HTMLElement.getComputedStyle (xapi)
• HTMLElement.getPageMappedXY (xapi)
• HTMLElement.hide (xapi)
• HTMLElement.insertAfterHTML (xapi)
• HTMLElement.insertBeforeHTML (xapi)
• HTMLElement.isNthChildOf (xapi)
• HTMLElement.prependChild (xapi)
• HTMLElement.prependHTML (xapi)
• HTMLElement.removeAllChildren (xapi)
• HTMLElement.removeElementsAfter (xapi)
• HTMLElement.removeElementsBefore (xapi)
• HTMLElement.reparent (xapi)
• HTMLElement.replaceWithHTML (xapi)
• HTMLElement.rotateElements (xapi)
• HTMLElement.show (xapi)
• HTMLImageElement.load (xapi)
• JSON.toString (xapi)
• Object.clone (xapi)
• Object.eachKey (xapi)
• Object.eachValue (xapi)
• Object.extend (xapi)
• Object.first (xapi)
• Object.hasKey (xapi)
• Object.key (xapi)
• Object.klist (xapi)
• Object.merge (xapi)
• Object.value (xapi)
• Set.symmetricDifference (xapi)
• ShadowRoot.qcfirst (xapi)
• ShadowRoot.qchildren (xapi)
• ShadowRoot.qclass (xapi)
• ShadowRoot.qid (xapi)
• ShadowRoot.qsall (xapi)
• ShadowRoot.qsel (xapi)
• ShadowRoot.qsfirst (xapi)
• ShadowRoot.qslast (xapi)
• ShadowRoot.qtag (xapi)
• ShadowRoot.qxy (xapi)
• ShadowRoot.qxys (xapi)
• String.fmt (xapi)
• String.makeHtmlSnippet (xapi)
• AJAX.fetch (xapi.AJAX)
• AppLoader.load (xapi.AppLoader)
• ResLoader.load (xapi.ResLoader)
• ResLoader.require (xapi.ResLoader)
• ResLoader.setChangeCallback (xapi.ResLoader)
• ResLoader.setCompletionCallback (xapi.ResLoader)
• ResLoader.setFinishCallback (xapi.ResLoader)

Library: xapi

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
xapi.jsJavascriptKenneth F. GuerinCopyright © 2020-2025, Brick Mill Games, LLC. All rights reserved.

Overview

This library contains the Javascript eXtensible API.

This library contains a short-hand, extensible API that maps either to pre-existing Javascript DOM functions or to new functionality.

X-Method Registry

Item
Attributes
Array.each(callback)
<extends: Array>
Array.first() → String
<extends: Array>
Array.last() → String
<extends: Array>
Array.removeIf(callback)
<extends: Array>
CustomElementRegistry.extends(tagName, jsClassName)
<extends: CustomElementRegistry>
CustomElementRegistry.getClass(tagName) → Constructor
<extends: CustomElementRegistry>
CustomElementRegistry.register(tagName, jsClassName)
<extends: CustomElementRegistry>
Document.createElementWithAttributes(tag, attrs) → HTMLElement
<extends: Document>
Document.findStylesheet(basename) → StyleSheet or Null
<extends: Document>
Document.htmlToElement(snippet) → HTMLElement or Null
<extends: Document>
Document.loadImage(source)
<extends: Document>
Document.qcfirst(name) → HTMLElement or Null
<extends: Document>
Document.qchildren(selector) → Array<HTMLNode>
<extends: Document>
Document.qclass(name) → HTMLCollection
<extends: Document>
Document.qid(id) → HTMLElement or Null
<extends: Document>
Document.qsall(selector) → NodeList
<extends: Document>
Document.qsel(selector) → HTMLElement or Null
<extends: Document>
Document.qsfirst(selector) → HTMLElement or Null
<extends: Document>
Document.qslast(selector) → HTMLElement or Null
<extends: Document>
Document.qtag(tag) → HTMLCollection
<extends: Document>
Document.qxy(x, y, include_shadows) → Array<HTMLElement> or Null
<extends: Document>
Document.walkElements(proc, xdata)
<extends: Document>
Element.fqname() → String
<extends: Element>
Element.qcfirst(name) → HTMLElement or Null
<extends: Element>
Element.qchildren(selector) → Array<HTMLNode>
<extends: Element>
Element.qclass(name) → HTMLCollection
<extends: Element>
Element.qid(id) → Element or Null
<extends: Element>
Element.qparent(tag) → Element or Null
<extends: Element>
Element.qsall(selector) → NodeList
<extends: Element>
Element.qsel(selector) → Element or Null
<extends: Element>
Element.qsfirst(selector) → HTMLElement or Null
<extends: Element>
Element.qtag(tag) → HTMLCollection
<extends: Element>
Element.walkElements(proc, xdata)
<extends: Element>
Element.where() → Array<Element>
<extends: Element>
HTMLElement.appendHTML(snippet)
<extends: HTMLElement>
HTMLElement.detach() → HTMLElement
<extends: HTMLElement>
HTMLElement.getComputedStyle(properties) → Hash
<extends: HTMLElement>
HTMLElement.getPageMappedXY(pageX, pageY, elist, index) → Object
<extends: HTMLElement>
HTMLElement.hide()
<extends: HTMLElement>
HTMLElement.insertAfterHTML(snippet)
<extends: HTMLElement>
HTMLElement.insertBeforeHTML(snippet)
<extends: HTMLElement>
HTMLElement.isNthChildOf(parent) → Integer or Null
<extends: HTMLElement>
HTMLElement.prependChild(child)
<extends: HTMLElement>
HTMLElement.prependHTML(snippet)
<extends: HTMLElement>
HTMLElement.removeAllChildren(parent) → HTMLElememt
<extends: HTMLElement>
HTMLElement.removeElementsAfter()
<extends: HTMLElement>
HTMLElement.removeElementsBefore()
<extends: HTMLElement>
HTMLElement.reparent(newParent, at)
<extends: HTMLElement>
HTMLElement.replaceWithHTML(snippet)
<extends: HTMLElement>
HTMLElement.rotateElements(firstToLast)
<extends: HTMLElement>
HTMLElement.show(type)
<extends: HTMLElement>
HTMLImageElement.load(source)
<extends: HTMLImageElement>
JSON.toString(obj) → String
<extends: JSON>
Object.clone() → Object
<extends: Object>
Object.eachKey(callback)
<extends: Object>
Object.eachValue(callback)
<extends: Object>
Object.extend(obj) → Object
<extends: Object>
Object.first() → Array<Any>
<extends: Object>
Object.hasKey(key) → Boolean
<extends: Object>
Object.key() → String
<extends: Object>
Object.klist() → Array<String>
<extends: Object>
Object.merge(obj) → Object
<extends: Object>
Object.value() → String
<extends: Object>
Set.symmetricDifference(other) → Set
<extends: Set>
ShadowRoot.qcfirst(name) → HTMLElement or Null
<extends: ShadowRoot>
ShadowRoot.qchildren(selector) → Array<HTMLNode>
<extends: ShadowRoot>
ShadowRoot.qclass(name) → HTMLCollection
<extends: ShadowRoot>
ShadowRoot.qid(id) → HTMLElement or Null
<extends: ShadowRoot>
ShadowRoot.qsall(selector) → NodeList
<extends: ShadowRoot>
ShadowRoot.qsel(selector) → HTMLElement or Null
<extends: ShadowRoot>
ShadowRoot.qsfirst(selector) → HTMLElement or Null
<extends: ShadowRoot>
ShadowRoot.qslast(selector) → HTMLElement or Null
<extends: ShadowRoot>
ShadowRoot.qtag(tag) → HTMLCollection
<extends: ShadowRoot>
ShadowRoot.qxy(x, y) → Array<HTMLElement> or Null
<extends: ShadowRoot>
ShadowRoot.qxys(x, y, deep) → Array<HTMLElement> or Null
<extends: ShadowRoot>
String.fmt() → String
<extends: String>
String.makeHtmlSnippet(tag, attrs, inner) → String
<extends: String>

X-Method Details

Array.each(callback)   <extends: Array>

This function calls a callback function on each item of the array.

Parameters:

  • callback [Function] — a callback function to call for each item in the array, breaks the loop if the callback returns false

Array.first() → String   <extends: Array>

This function returns the first element of the array.

Returns:

  • [String] — the first element of the Array

Array.last() → String   <extends: Array>

This function returns the last element of the array.

Returns:

  • [String] — the last element of the Array

Array.removeIf(callback)   <extends: Array>

This function removes elements from the array based on the boolean results of the callback function.

Parameters:

  • callback [Function] — a callback function to call to determine if an element should be removed

CustomElementRegistry.extends(tagName, jsClassName)   <extends: CustomElementRegistry>

This method is an alias for 'CustomElementRegistry.define', which creates a new custom element by extending from an existing element.

Parameters:

  • tagName [String] — the tag name of the custom element to define
  • jsClassName [String] — the Javascript class name of the class that defines the operation of the custom element

CustomElementRegistry.getClass(tagName) → Constructor   <extends: CustomElementRegistry>

This method is an alias for 'CustomElementRegistry.get'.

Parameters:

  • tagName [String] — the tag name of the custom element to define

Returns:

  • [Constructor] — the constructor of the Javascript class which was used to define the custom element

CustomElementRegistry.register(tagName, jsClassName)   <extends: CustomElementRegistry>

This method is an alias for 'CustomElementRegistry.define', which creates a new custom element w/o extending from an existing element.

Parameters:

  • tagName [String] — the tag name of the custom element to define
  • jsClassName [String] — the Javascript class name of the class that defines the operation of the custom element

Document.createElementWithAttributes(tag, attrs) → HTMLElement   <extends: Document>

This method calls document.createElement and sets the attributes by walking the specified attr hash and using setAttribute on each.

Parameters:

  • tag [String] — the element's tag name
  • attrs [Hash] — the element's attributes represented by a key/value Hash object

Returns:

  • [HTMLElement] — the HTMLElement created

Document.findStylesheet(basename) → StyleSheet or Null   <extends: Document>

This method returns a stylesheet based on the specified filename

Parameters:

  • basename [String] — the pathless filename to search for

Returns:

  • [StyleSheet or Null] — the stylesheet which has the basename as as the trailing part of its href

Document.htmlToElement(snippet) → HTMLElement or Null   <extends: Document>

This method creates an HTML element from the given snippet of HTML text.

Parameters:

  • snippet [String] — the HTML snippet to convert to an HTMLElement

Returns:

  • [HTMLElement or Null] — the HTMLElement (and subtree) described by the given valid HTML snippet

Document.loadImage(source)   <extends: Document>

This method does an asynchronous deferred load of an image from the specified source.

Parameters:

  • source [String] — the source of the image

Document.qcfirst(name) → HTMLElement or Null   <extends: Document>

This method returns the first element of a specified class, if it exists

Parameters:

  • name [String] — the class name of the elements to find

Returns:

  • [HTMLElement or Null] — the first element of the specified class

Document.qchildren(selector) → Array<HTMLNode>   <extends: Document>

This method filters a call to Document.qsall to direct children.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [Array<HTMLNode>] — the 'non-live' list of HTML Nodes which satisfy the query

Document.qclass(name) → HTMLCollection   <extends: Document>

This method is an alias for 'getElementsByClassName', which searches the document for elements with the specified tag.

Parameters:

  • name [String] — the class name of the elements to find

Returns:

  • [HTMLCollection] — the 'live' collection of HTML Elements which are of the specified class

Document.qid(id) → HTMLElement or Null   <extends: Document>

This method is uses the built-in querySelector to find an element with the given id

Parameters:

  • id [String] — the id attribute of the element to find

Returns:

  • [HTMLElement or Null] — the HTML Element with the specified 'id' attribute value (or Null if not found)

Document.qsall(selector) → NodeList   <extends: Document>

This method is an alias for 'querySelectorAll', which searches the document for elements using the specified selector.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [NodeList] — the 'non-live' list of HTML Nodes which satisfy the query

Document.qsel(selector) → HTMLElement or Null   <extends: Document>

This method is an alias for 'querySelector', which searches the document for elements using the specified selector.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [HTMLElement or Null] — the first element of the document which satisfies the query (or Null if not found)

Document.qsfirst(selector) → HTMLElement or Null   <extends: Document>

This method uses qsall to return the array to find the first element

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [HTMLElement or Null] — the first element of the document which satisfies the query (or Null if not found)

Document.qslast(selector) → HTMLElement or Null   <extends: Document>

This method uses qsall to return the array to find the last element

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [HTMLElement or Null] — the last element of the document which satisfies the query (or Null if not found)

Document.qtag(tag) → HTMLCollection   <extends: Document>

This method is an alias for 'getElementsByTagName', which searches the document for elements with the specified tag.

Parameters:

  • tag [String] — the tag of the elements to find

Returns:

  • [HTMLCollection] — the 'live' collection of HTML Elements which have the specified tag

Document.qxy(x, y, include_shadows) → Array<HTMLElement> or Null   <extends: Document>

This method returns a list of elements at the specified point in the document in topmost visible order.

Parameters:

  • x [Number] — the document x-coordinate to be searched
  • y [Number] — the document y-coordinate to be searched
  • include_shadows [Boolean] — if true, will also include visible shadow DOM elements in the list <default: false>

Returns:

  • [Array<HTMLElement> or Null] — the list of visible HTML Elements at the specified document coordinates (or Null if not found)

Document.walkElements(proc, xdata)   <extends: Document>

This method calls document.body.walkElements() to traverse the entire document tree.

Parameters:

  • proc [Function] — the Javascript function to call for each element in the tree
  • xdata [Data] — the optional external data element to pass to each proc call <default: Null>

Element.fqname() → String   <extends: Element>

This method creates a fully-qualified name for the element, consisting of its tagName (converted to lower case), class names (prefixed with '.') and id (if defined, prefixed with '#').

Returns:

  • [String] — the fully qualified name of the element

Element.qcfirst(name) → HTMLElement or Null   <extends: Element>

This method returns the first element of a specified class, if it exists

Parameters:

  • name [String] — the class name of the elements to find

Returns:

  • [HTMLElement or Null] — the first element of the specified class

Element.qchildren(selector) → Array<HTMLNode>   <extends: Element>

This method filters a call to Element.qsall to direct children.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [Array<HTMLNode>] — the 'non-live' list of HTML Nodes which satisfy the query

Element.qclass(name) → HTMLCollection   <extends: Element>

This method is an alias for 'getElementsByClassName', which searches the subtree for elements with the specified tag.

Parameters:

  • name [String] — the class name of the elements to find

Returns:

  • [HTMLCollection] — the 'live' collection of HTML Elements which are of the specified class

Element.qid(id) → Element or Null   <extends: Element>

This method is an alias for 'querySelector', which searches the subtree for the element with the specified 'id' attribute value.

Parameters:

  • id [String] — the id attribute of the element to find

Returns:

  • [Element or Null] — the HTML Element with the specified 'id' attribute value (or Null if not found)

Element.qparent(tag) → Element or Null   <extends: Element>

This method locates an ancestor element with the given tag.

Parameters:

  • tag [String] — the tag of the ancestor element to locate

Returns:

  • [Element or Null] — the ancestor element with the given tag (or Null if not found)

Element.qsall(selector) → NodeList   <extends: Element>

This method is an alias for 'querySelectorAll', which searches the subtree for elements using the specified selector.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [NodeList] — the 'non-live' list of HTML Nodes which satisfy the query

Element.qsel(selector) → Element or Null   <extends: Element>

This method is an alias for 'querySelector', which searches the subtree for elements using the specified selector.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [Element or Null] — the first element of the document which satisfies the query (or Null if not found)

Element.qsfirst(selector) → HTMLElement or Null   <extends: Element>

This method uses qsall to return the array to find the first element

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [HTMLElement or Null] — the first element of the document which satisfies the query (or Null if not found)

Element.qtag(tag) → HTMLCollection   <extends: Element>

This method is an alias for 'getElementsByTagName', which searches the subtree for elements with the specified tag.

Parameters:

  • tag [String] — the tag of the elements to find

Returns:

  • [HTMLCollection] — the 'live' collection of HTML Elements which have the specified tag

Element.walkElements(proc, xdata)   <extends: Element>

This method visits every element in the subtree and calls the given procedure with the given external data.

Parameters:

  • proc [Function] — the Javascript function to call for each element in the subtree beginning with this element
  • xdata [Data] — the optional external data element to pass to each proc call <default: Null>

Element.where() → Array<Element>   <extends: Element>

This method returns this element's ancestry list of elements in the document from most distant to its immediate parent.

Returns:

  • [Array<Element>] — the array of this elements ancestry elements in order from most distant to its immediate parent

HTMLElement.appendHTML(snippet)   <extends: HTMLElement>

This method appends an element (and its subtree) as described by the given HTML snippet into this element's children list.

Parameters:

  • snippet [String] — the HTML snippet

HTMLElement.detach() → HTMLElement   <extends: HTMLElement>

This method removes itself from its parent.

Returns:

  • [HTMLElement] — this HTML Element

HTMLElement.getComputedStyle(properties) → Hash   <extends: HTMLElement>

Ths method retrieves computed styles from the element.

Parameters:

  • properties [String or Array<String> or Null] — the properties to retrieve from the elements computed styles <default: null>

Returns:

  • [Hash] — the requested style propertites, or all if null is specified

HTMLElement.getPageMappedXY(pageX, pageY, elist, index) → Object   <extends: HTMLElement>

This function returns coordinate mappings of the targeted element referenced from its position in the viewable area and its effective position taking scrolling into account.

Parameters:

  • pageX [Number] — the x-coordinate of the location at the page / document level
  • pageY [Number] — the y-coordinate of the location at the page / document level
  • elist [Array<HTMLElement>] — the list of stacked elements to process <default: null>
  • index [Integer] — the starting location within the elist to begin processing <default: 0>

Returns:

  • [Object] — a Hash containing coordinate mappings

HTMLElement.hide()   <extends: HTMLElement>

This method hides this element by settings its style's display attribute to 'none'.

HTMLElement.insertAfterHTML(snippet)   <extends: HTMLElement>

This method inserts an element (and its subtree) as described by the given HTML snippet after this element in its parent's children list.

Parameters:

  • snippet [String] — the HTML snippet

HTMLElement.insertBeforeHTML(snippet)   <extends: HTMLElement>

This method inserts an element (and its subtree) as described by the given HTML snippet before this element in its parent's children list.

Parameters:

  • snippet [String] — the HTML snippet

HTMLElement.isNthChildOf(parent) → Integer or Null   <extends: HTMLElement>

This method checks to see if this element is a child of the specified parent and where in the parent's children list the element is.

Parameters:

  • parent [HTMLElement] — the conjectured parent element

Returns:

  • [Integer or Null] — the index within the parent's children list (or Null if the element is not a child of the specified parent)

HTMLElement.prependChild(child)   <extends: HTMLElement>

This method inserts the child element into the parent's children list as the new first element.

Parameters:

  • child [HTMLElement] — the element to add as the element's first child

HTMLElement.prependHTML(snippet)   <extends: HTMLElement>

This method prepends an element (and its subtree) as described by the given HTML snippet into this element's children list.

Parameters:

  • snippet [String] — the HTML snippet

HTMLElement.removeAllChildren(parent) → HTMLElememt   <extends: HTMLElement>

This method removes all of an element's children.

Parameters:

  • parent [HTMLElement] — the conjectured parent element

Returns:

  • [HTMLElememt] — the element

HTMLElement.removeElementsAfter()   <extends: HTMLElement>

This method removes child elements after this element in its parent's children list.

HTMLElement.removeElementsBefore()   <extends: HTMLElement>

This method removes child elements before this element in its parent's children list.

HTMLElement.reparent(newParent, at)   <extends: HTMLElement>

This method removes itself from its current parent and attaches itself to a new parent.

Parameters:

  • newParent [HTMLElement] — the new parent element for this element
  • at [Integer] — the optional index within the new parent's children list to insert this element <default: 0>

HTMLElement.replaceWithHTML(snippet)   <extends: HTMLElement>

This method replaces this element with an element (and its subtree) as described by the given HTML snippet in its parent's children list.

Parameters:

  • snippet [String] — the HTML snippet

HTMLElement.rotateElements(firstToLast)   <extends: HTMLElement>

This method rotates an element's children. If firstToLast is true, the first child become the last child. Else, the last child becomes the first child.

Parameters:

  • firstToLast [Boolean] — the direction of the rotation <default: true>

HTMLElement.show(type)   <extends: HTMLElement>

This method displays this element by setting its style's display property to the given type, or 'block'

Parameters:

  • type [String] — the display style for this element <default: 'block'>

HTMLImageElement.load(source)   <extends: HTMLImageElement>

This method does an asynchronous deferred load of an image into the HTMLImageElement.

Parameters:

  • source [String] — the source of the image

JSON.toString(obj) → String   <extends: JSON>

This method is an alias for 'JSON.stringify' if the Javascript's implementation of JSON does not have a toString method.

Parameters:

  • obj [Object] — the object to convert to a JSON string

Returns:

  • [String] — the JSON string which represents the given object

Object.clone() → Object   <extends: Object>

This function clones an existing object.

Returns:

  • [Object] — a new cloned object

Object.eachKey(callback)   <extends: Object>

This function calls a callback function for each key/property of the Object. If the callback function returns false, the iteration is aborted.

Parameters:

  • callback [Function] — a callback function to be called for each key/property of the Object

Object.eachValue(callback)   <extends: Object>

This function calls a callback function for each value of the Object. If the callback function returns false, the iteration is aborted.

Parameters:

  • callback [Function] — a callback function to be called for each value of the Object

Object.extend(obj) → Object   <extends: Object>

This function extends the given object with new properties supplied from the specified source object.

Parameters:

  • obj [Object] — an object whose properties will be merged with the current object

Returns:

  • [Object] — the original object extended

Object.first() → Array<Any>   <extends: Object>

This function returns the list of values in the Object.

Returns:

  • [Array<Any>] — the list of values in the Object

Object.hasKey(key) → Boolean   <extends: Object>

This function returns true if the given key is defined within the Object.

Parameters:

  • key [String] — the name of the key/property to test the existance of within the object

Returns:

  • [Boolean] — true if the key exists within the Object

Object.key() → String   <extends: Object>

This function returns the name of the first key/property of the Object.

Returns:

  • [String] — the first key/property of the Object

Object.klist() → Array<String>   <extends: Object>

This function returns the list of keys/properties in the object.

Returns:

  • [Array<String>] — the list of keys/properties in the Object

Object.merge(obj) → Object   <extends: Object>

This function returns a new object based on properties from the source object and the specified object.

Parameters:

  • obj [Object] — an object whose properties will be used to build a new object

Returns:

  • [Object] — a new object containing properties from both objects

Object.value() → String   <extends: Object>

This function returns the name of the first value of the Object.

Returns:

  • [String] — the first element of the Object

Set.symmetricDifference(other) → Set   <extends: Set>

This function determines the symmetric difference between two Sets.

Parameters:

  • other [Set] — the other set to compare against

Returns:

  • [Set] — a set containing the symmetric difference between this set and the other one

ShadowRoot.qcfirst(name) → HTMLElement or Null   <extends: ShadowRoot>

This method returns the first element of a specified class, if it exists

Parameters:

  • name [String] — the class name of the elements to find

Returns:

  • [HTMLElement or Null] — the first element of the specified class

ShadowRoot.qchildren(selector) → Array<HTMLNode>   <extends: ShadowRoot>

This method filters a call to ShadowRoot.qsall to direct children.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [Array<HTMLNode>] — the 'non-live' list of HTML Nodes which satisfy the query

ShadowRoot.qclass(name) → HTMLCollection   <extends: ShadowRoot>

This method is an alias for 'getElementsByClassName', which searches the shadow root for elements with the specified tag.

Parameters:

  • name [String] — the class name of the elements to find

Returns:

  • [HTMLCollection] — the 'live' collection of HTML Elements which are of the specified class

ShadowRoot.qid(id) → HTMLElement or Null   <extends: ShadowRoot>

This method is an alias for 'querySelector', which searches the shadow root for the element with the specified 'id' attribute value.

Parameters:

  • id [String] — the id attribute of the element to find

Returns:

  • [HTMLElement or Null] — the HTML Element with the specified 'id' attribute value (or Null if not found)

ShadowRoot.qsall(selector) → NodeList   <extends: ShadowRoot>

This method is an alias for 'querySelectorAll', which searches the shadow root for elements using the specified selector.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [NodeList] — the 'non-live' list of HTML Nodes which satisfy the query

ShadowRoot.qsel(selector) → HTMLElement or Null   <extends: ShadowRoot>

This method is an alias for 'querySelector', which searches the shadow root for elements using the specified selector.

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [HTMLElement or Null] — the first element of the document which satisfies the query (or Null if not found)

ShadowRoot.qsfirst(selector) → HTMLElement or Null   <extends: ShadowRoot>

This method uses qsall to return the array to find the first element

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [HTMLElement or Null] — the first element of the document which satisfies the query (or Null if not found)

ShadowRoot.qslast(selector) → HTMLElement or Null   <extends: ShadowRoot>

This method uses qsall to return the array to find the last element

Parameters:

  • selector [String] — the query selector used for the search

Returns:

  • [HTMLElement or Null] — the last element of the document which satisfies the query (or Null if not found)

ShadowRoot.qtag(tag) → HTMLCollection   <extends: ShadowRoot>

This method is an alias for 'getElementsByTagName', which searches the shadow root for elements with the specified tag.

Parameters:

  • tag [String] — the tag of the elements to find

Returns:

  • [HTMLCollection] — the 'live' collection of HTML Elements which have the specified tag

ShadowRoot.qxy(x, y) → Array<HTMLElement> or Null   <extends: ShadowRoot>

This method returns a list of elements at the specified point in the document in topmost visible order.

Parameters:

  • x [Number] — the document x-coordinate to be searched
  • y [Number] — the document y-coordinate to be searched

Returns:

  • [Array<HTMLElement> or Null] — the list of visible HTML Elements at the specified document coordinates, including the shadow DOM of the given element (or Null if not found)

ShadowRoot.qxys(x, y, deep) → Array<HTMLElement> or Null   <extends: ShadowRoot>

This method returns a list of elements within a given element's shadow DOM at the specified point in the document in topmost visible order.

Parameters:

  • x [Number] — the document x-coordinate to be searched
  • y [Number] — the document y-coordinate to be searched
  • deep [Boolean] — if true, add contained element's shadow DOMs as well

Returns:

  • [Array<HTMLElement> or Null] — the list of visible HTML Elements in the hosting element's shadow DOM at the specified document coordinates (or Null if not found)

String.fmt() → String   <extends: String>

This function formats the incoming arguments into a string suitable for output, similar to the C function sprintf().

Returns:

  • [String] — the formatted string

String.makeHtmlSnippet(tag, attrs, inner) → String   <extends: String>

This function formats the incoming arguments into a string suitable for output, similar to the C function sprintf().

Parameters:

  • tag [String] — the name of the element to create
  • attrs [String or Array<String> or Function] — a string, an array of attribute/value pairs or a function which will return the attr-string <default: ''>
  • inner [String or Function] — a string or function which will return a string which will serve as the inner content of the element <default: ''>

Returns:

  • [String] — the formatted string

Namespace: xapi.AJAX

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
xapi.jsJavascriptKenneth F. GuerinCopyright © 2020-2025, Brick Mill Games, LLC. All rights reserved.

Overview

The AJAX namespace encapsulates network interactions with a remote server.

The AJAX namespace encapsulates network interactions with a remote server. Even though it is called AJAX, it relies on the newer fetch API.

Function Registry

Item
Attributes
AJAX.fetch(url, payload, method) → Promise
-

Function Details

AJAX.fetch(url, payload, method) → Promise

This method is a wrapper for the fetch API.

Parameters:

  • url [String] — the URL of the server to communicate with
  • payload [String] — the communications payload
  • method [String] — the communications method <default: POST>

Returns:

  • [Promise] — the Promise object which will resolve to a Response object

Namespace: xapi.AppLoader

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
xapi.jsJavascriptKenneth F. GuerinCopyright © 2020-2025, Brick Mill Games, LLC. All rights reserved.

Overview

The AppLoader namespace encapsulates dynamic resource loading operations on app start.

Function Registry

Item
Attributes
AppLoader.load(callback, prime)
-

Function Details

AppLoader.load(callback, prime)

The AppLoader namespace encapsulates dynamic resource loading operations.

Parameters:

  • callback [Function] — a function that loads app resources via multiple stages.
  • prime [Varargs] — extra arguments that will get passed to the callback during the stage 0 pipeline priming step

Class: xapi.ArgumentError ← Error

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
xapi.jsJavascriptKenneth F. GuerinCopyright © 2020-2025, Brick Mill Games, LLC. All rights reserved.

Overview

This class extends the Error exception by categorizing it as an ArgumentError.

Namespace: xapi.ResLoader

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
xapi.jsJavascriptKenneth F. GuerinCopyright © 2020-2025, Brick Mill Games, LLC. All rights reserved.

Overview

The ResLoader namespace encapsulates dynamic script loading operations.

The ResLoader namespace encapsulates dynamic script loading operations.

Function Registry

Item
Attributes
ResLoader.load(src, async, callback)
-
ResLoader.require(list)
-
ResLoader.setChangeCallback(callback)
-
ResLoader.setCompletionCallback(callback)
-
ResLoader.setFinishCallback(callback)
-

Function Details

ResLoader.load(src, async, callback)

This method loads a script into a script element and appends it to the document's head.

Parameters:

  • src [String] — the script src
  • async [Boolean] — if true, loads the script asynchronously <default: false>
  • callback [Proc] — the callback to call when the script is loaded <default: null>

ResLoader.require(list)

This function loads a list of scripts asynchronously to the document's head. The pipeline ensures that downstream requirements are inserted at the head of the list.

Parameters:

  • list [Varargs] — the list of resources to load

ResLoader.setChangeCallback(callback)

This function sets a callback function to be called whenever the internal requirements pipeline is added to.

Parameters:

  • callback [Function] — the callback function, arguments are: the internal requirements array

ResLoader.setCompletionCallback(callback)

This function sets a callback function to be called whenever a resource has been processed, whether loaded successfully or not.

Parameters:

  • callback [Function] — the callback function, arguments are: the item loaded and its process status (true if successful)

ResLoader.setFinishCallback(callback)

This function sets a callback function to be called whenever the requirements array is empty

Parameters:

  • callback [Function] — the callback function, no arguments

Class: xapi.RuntimeError ← Error

File Manifest

File Manifest
FileLanguageAuthor(s)Copyright
xapi.jsJavascriptKenneth F. GuerinCopyright © 2020-2025, Brick Mill Games, LLC. All rights reserved.

Overview

This class extends the Error exception by categorizing it as an RuntimeError.

This documentation page was generated by the Codoc gem on 04-Nov-2025 at 12:09:23.

NCS Color Table

Color Info:
CSpec: -
Hex: -
RGB: -
ncs_0300_N
ncs_0500_N
ncs_0502_B
ncs_0502_B50G
ncs_0502_G
ncs_0502_G50Y
ncs_0502_R
ncs_0502_R50B
ncs_0502_Y
ncs_0502_Y50R
ncs_0505_B
ncs_0505_B20G
ncs_0505_B50G
ncs_0505_B80G
ncs_0505_G
ncs_0505_G10Y
ncs_0505_G20Y
ncs_0505_G30Y
ncs_0505_G40Y
ncs_0505_G50Y
ncs_0505_G60Y
ncs_0505_G70Y
ncs_0505_G80Y
ncs_0505_G90Y
ncs_0505_R
ncs_0505_R10B
ncs_0505_R20B
ncs_0505_R30B
ncs_0505_R40B
ncs_0505_R50B
ncs_0505_R60B
ncs_0505_R70B
ncs_0505_R80B
ncs_0505_R90B
ncs_0505_Y
ncs_0505_Y10R
ncs_0505_Y20R
ncs_0505_Y30R
ncs_0505_Y40R
ncs_0505_Y50R
ncs_0505_Y60R
ncs_0505_Y70R
ncs_0505_Y80R
ncs_0505_Y90R
ncs_0507_B
ncs_0507_B20G
ncs_0507_B80G
ncs_0507_G
ncs_0507_G40Y
ncs_0507_G80Y
ncs_0507_R
ncs_0507_R20B
ncs_0507_R40B
ncs_0507_R60B
ncs_0507_R80B
ncs_0507_Y
ncs_0507_Y20R
ncs_0507_Y40R
ncs_0507_Y60R
ncs_0507_Y80R
ncs_0510_B
ncs_0510_B10G
ncs_0510_B30G
ncs_0510_B50G
ncs_0510_B70G
ncs_0510_B90G
ncs_0510_G
ncs_0510_G10Y
ncs_0510_G20Y
ncs_0510_G30Y
ncs_0510_G40Y
ncs_0510_G50Y
ncs_0510_G60Y
ncs_0510_G70Y
ncs_0510_G80Y
ncs_0510_G90Y
ncs_0510_R
ncs_0510_R10B
ncs_0510_R20B
ncs_0510_R30B
ncs_0510_R40B
ncs_0510_R50B
ncs_0510_R60B
ncs_0510_R70B
ncs_0510_R80B
ncs_0510_R90B
ncs_0510_Y
ncs_0510_Y10R
ncs_0510_Y20R
ncs_0510_Y30R
ncs_0510_Y40R
ncs_0510_Y50R
ncs_0510_Y60R
ncs_0510_Y70R
ncs_0510_Y80R
ncs_0510_Y90R
ncs_0515_B
ncs_0515_B20G
ncs_0515_B50G
ncs_0515_B80G
ncs_0515_G
ncs_0515_G20Y
ncs_0515_G40Y
ncs_0515_G60Y
ncs_0515_G80Y
ncs_0515_G90Y
ncs_0515_R
ncs_0515_R10B
ncs_0515_R20B
ncs_0515_R40B
ncs_0515_R60B
ncs_0515_R80B
ncs_0515_R90B
ncs_0515_Y
ncs_0515_Y10R
ncs_0515_Y20R
ncs_0515_Y30R
ncs_0515_Y40R
ncs_0515_Y50R
ncs_0515_Y60R
ncs_0515_Y70R
ncs_0515_Y80R
ncs_0515_Y90R
ncs_0520_B
ncs_0520_B10G
ncs_0520_B30G
ncs_0520_B40G
ncs_0520_B50G
ncs_0520_B60G
ncs_0520_B70G
ncs_0520_B90G
ncs_0520_G
ncs_0520_G10Y
ncs_0520_G20Y
ncs_0520_G30Y
ncs_0520_G40Y
ncs_0520_G50Y
ncs_0520_G60Y
ncs_0520_G70Y
ncs_0520_G80Y
ncs_0520_G90Y
ncs_0520_R
ncs_0520_R10B
ncs_0520_R20B
ncs_0520_R30B
ncs_0520_R40B
ncs_0520_R50B
ncs_0520_R60B
ncs_0520_R70B
ncs_0520_R80B
ncs_0520_R90B
ncs_0520_Y
ncs_0520_Y10R
ncs_0520_Y20R
ncs_0520_Y30R
ncs_0520_Y40R
ncs_0520_Y50R
ncs_0520_Y60R
ncs_0520_Y70R
ncs_0520_Y80R
ncs_0520_Y90R
ncs_0525_R60B
ncs_0525_R70B
ncs_0530_B
ncs_0530_B10G
ncs_0530_B30G
ncs_0530_B40G
ncs_0530_B50G
ncs_0530_B60G
ncs_0530_B70G
ncs_0530_B90G
ncs_0530_G
ncs_0530_G10Y
ncs_0530_G20Y
ncs_0530_G30Y
ncs_0530_G40Y
ncs_0530_G50Y
ncs_0530_G60Y
ncs_0530_G70Y
ncs_0530_G80Y
ncs_0530_G90Y
ncs_0530_R
ncs_0530_R10B
ncs_0530_R20B
ncs_0530_R30B
ncs_0530_R40B
ncs_0530_R50B
ncs_0530_R80B
ncs_0530_R90B
ncs_0530_Y
ncs_0530_Y10R
ncs_0530_Y20R
ncs_0530_Y30R
ncs_0530_Y40R
ncs_0530_Y50R
ncs_0530_Y60R
ncs_0530_Y70R
ncs_0530_Y80R
ncs_0530_Y90R
ncs_0540_B
ncs_0540_B10G
ncs_0540_B30G
ncs_0540_G
ncs_0540_G10Y
ncs_0540_G20Y
ncs_0540_G30Y
ncs_0540_G40Y
ncs_0540_G50Y
ncs_0540_G60Y
ncs_0540_G70Y
ncs_0540_G80Y
ncs_0540_G90Y
ncs_0540_R
ncs_0540_R10B
ncs_0540_R20B
ncs_0540_R30B
ncs_0540_R90B
ncs_0540_Y
ncs_0540_Y10R
ncs_0540_Y20R
ncs_0540_Y30R
ncs_0540_Y40R
ncs_0540_Y50R
ncs_0540_Y60R
ncs_0540_Y70R
ncs_0540_Y80R
ncs_0540_Y90R
ncs_0550_G10Y
ncs_0550_G20Y
ncs_0550_G30Y
ncs_0550_G40Y
ncs_0550_G50Y
ncs_0550_G60Y
ncs_0550_G70Y
ncs_0550_G80Y
ncs_0550_G90Y
ncs_0550_R
ncs_0550_R10B
ncs_0550_Y
ncs_0550_Y10R
ncs_0550_Y20R
ncs_0550_Y30R
ncs_0550_Y40R
ncs_0550_Y50R
ncs_0550_Y60R
ncs_0550_Y70R
ncs_0550_Y80R
ncs_0550_Y90R
ncs_0560_G10Y
ncs_0560_G20Y
ncs_0560_G30Y
ncs_0560_G40Y
ncs_0560_G50Y
ncs_0560_G60Y
ncs_0560_G70Y
ncs_0560_G80Y
ncs_0560_G90Y
ncs_0560_R
ncs_0560_Y
ncs_0560_Y10R
ncs_0560_Y20R
ncs_0560_Y30R
ncs_0560_Y40R
ncs_0560_Y50R
ncs_0560_Y60R
ncs_0560_Y70R
ncs_0560_Y80R
ncs_0560_Y90R
ncs_0565_G10Y
ncs_0565_G50Y
ncs_0565_R
ncs_0570_G20Y
ncs_0570_G30Y
ncs_0570_G40Y
ncs_0570_G60Y
ncs_0570_G70Y
ncs_0570_G80Y
ncs_0570_G90Y
ncs_0570_Y
ncs_0570_Y10R
ncs_0570_Y20R
ncs_0570_Y30R
ncs_0570_Y40R
ncs_0570_Y50R
ncs_0570_Y60R
ncs_0570_Y70R
ncs_0570_Y80R
ncs_0570_Y90R
ncs_0575_G20Y
ncs_0575_G40Y
ncs_0575_G60Y
ncs_0575_G70Y
ncs_0575_G90Y
ncs_0580_G30Y
ncs_0580_Y
ncs_0580_Y10R
ncs_0580_Y20R
ncs_0580_Y30R
ncs_0580_Y40R
ncs_0580_Y50R
ncs_0580_Y60R
ncs_0580_Y70R
ncs_0580_Y80R
ncs_0580_Y90R
ncs_0585_Y20R
ncs_0585_Y30R
ncs_0585_Y40R
ncs_0585_Y50R
ncs_0585_Y60R
ncs_0585_Y70R
ncs_0585_Y80R
ncs_0603_G40Y
ncs_0603_G80Y
ncs_0603_R20B
ncs_0603_R40B
ncs_0603_R60B
ncs_0603_R80B
ncs_0603_Y20R
ncs_0603_Y40R
ncs_0603_Y60R
ncs_0603_Y80R
ncs_0804_B50G
ncs_0804_G20Y
ncs_0804_G60Y
ncs_0804_G90Y
ncs_0804_R10B
ncs_0804_R30B
ncs_0804_R50B
ncs_0804_R70B
ncs_0804_R90B
ncs_0804_Y10R
ncs_0804_Y30R
ncs_0804_Y50R
ncs_0804_Y70R
ncs_0804_Y90R
ncs_0907_B20G
ncs_0907_B80G
ncs_0907_G20Y
ncs_0907_G60Y
ncs_0907_G90Y
ncs_0907_R10B
ncs_0907_R30B
ncs_0907_R50B
ncs_0907_R70B
ncs_0907_R90B
ncs_0907_Y10R
ncs_0907_Y30R
ncs_0907_Y50R
ncs_0907_Y70R
ncs_0907_Y90R
ncs_1000_N
ncs_1002_B
ncs_1002_B50G
ncs_1002_G
ncs_1002_G50Y
ncs_1002_R
ncs_1002_R50B
ncs_1002_Y
ncs_1002_Y50R
ncs_1005_B
ncs_1005_B20G
ncs_1005_B50G
ncs_1005_B80G
ncs_1005_G
ncs_1005_G10Y
ncs_1005_G20Y
ncs_1005_G30Y
ncs_1005_G40Y
ncs_1005_G50Y
ncs_1005_G60Y
ncs_1005_G70Y
ncs_1005_G80Y
ncs_1005_G90Y
ncs_1005_R
ncs_1005_R10B
ncs_1005_R20B
ncs_1005_R30B
ncs_1005_R40B
ncs_1005_R50B
ncs_1005_R60B
ncs_1005_R70B
ncs_1005_R80B
ncs_1005_R90B
ncs_1005_Y
ncs_1005_Y10R
ncs_1005_Y20R
ncs_1005_Y30R
ncs_1005_Y40R
ncs_1005_Y50R
ncs_1005_Y60R
ncs_1005_Y70R
ncs_1005_Y80R
ncs_1005_Y90R
ncs_1010_B
ncs_1010_B10G
ncs_1010_B30G
ncs_1010_B50G
ncs_1010_B70G
ncs_1010_B90G
ncs_1010_G
ncs_1010_G10Y
ncs_1010_G20Y
ncs_1010_G30Y
ncs_1010_G40Y
ncs_1010_G50Y
ncs_1010_G60Y
ncs_1010_G70Y
ncs_1010_G80Y
ncs_1010_G90Y
ncs_1010_R
ncs_1010_R10B
ncs_1010_R20B
ncs_1010_R30B
ncs_1010_R40B
ncs_1010_R50B
ncs_1010_R60B
ncs_1010_R70B
ncs_1010_R80B
ncs_1010_R90B
ncs_1010_Y
ncs_1010_Y10R
ncs_1010_Y20R
ncs_1010_Y30R
ncs_1010_Y40R
ncs_1010_Y50R
ncs_1010_Y60R
ncs_1010_Y70R
ncs_1010_Y80R
ncs_1010_Y90R
ncs_1015_B
ncs_1015_B20G
ncs_1015_B50G
ncs_1015_B80G
ncs_1015_G
ncs_1015_G20Y
ncs_1015_G40Y
ncs_1015_G60Y
ncs_1015_G80Y
ncs_1015_G90Y
ncs_1015_R
ncs_1015_R10B
ncs_1015_R20B
ncs_1015_R40B
ncs_1015_R60B
ncs_1015_R80B
ncs_1015_R90B
ncs_1015_Y
ncs_1015_Y10R
ncs_1015_Y20R
ncs_1015_Y30R
ncs_1015_Y40R
ncs_1015_Y50R
ncs_1015_Y60R
ncs_1015_Y70R
ncs_1015_Y80R
ncs_1015_Y90R
ncs_1020_B
ncs_1020_B10G
ncs_1020_B30G
ncs_1020_B40G
ncs_1020_B50G
ncs_1020_B60G
ncs_1020_B70G
ncs_1020_B90G
ncs_1020_G
ncs_1020_G10Y
ncs_1020_G20Y
ncs_1020_G30Y
ncs_1020_G40Y
ncs_1020_G50Y
ncs_1020_G60Y
ncs_1020_G70Y
ncs_1020_G80Y
ncs_1020_G90Y
ncs_1020_R
ncs_1020_R10B
ncs_1020_R20B
ncs_1020_R30B
ncs_1020_R40B
ncs_1020_R50B
ncs_1020_R60B
ncs_1020_R70B
ncs_1020_R80B
ncs_1020_R90B
ncs_1020_Y
ncs_1020_Y10R
ncs_1020_Y20R
ncs_1020_Y30R
ncs_1020_Y40R
ncs_1020_Y50R
ncs_1020_Y60R
ncs_1020_Y70R
ncs_1020_Y80R
ncs_1020_Y90R
ncs_1030_B
ncs_1030_B10G
ncs_1030_B30G
ncs_1030_B40G
ncs_1030_B50G
ncs_1030_B60G
ncs_1030_B70G
ncs_1030_B90G
ncs_1030_G
ncs_1030_G10Y
ncs_1030_G20Y
ncs_1030_G30Y
ncs_1030_G40Y
ncs_1030_G50Y
ncs_1030_G60Y
ncs_1030_G70Y
ncs_1030_G80Y
ncs_1030_G90Y
ncs_1030_R
ncs_1030_R10B
ncs_1030_R20B
ncs_1030_R30B
ncs_1030_R40B
ncs_1030_R50B
ncs_1030_R60B
ncs_1030_R70B
ncs_1030_R80B
ncs_1030_R90B
ncs_1030_Y
ncs_1030_Y10R
ncs_1030_Y20R
ncs_1030_Y30R
ncs_1030_Y40R
ncs_1030_Y50R
ncs_1030_Y60R
ncs_1030_Y70R
ncs_1030_Y80R
ncs_1030_Y90R
ncs_1040_B
ncs_1040_B10G
ncs_1040_B20G
ncs_1040_B30G
ncs_1040_B40G
ncs_1040_B50G
ncs_1040_B60G
ncs_1040_B70G
ncs_1040_B80G
ncs_1040_B90G
ncs_1040_G
ncs_1040_G10Y
ncs_1040_G20Y
ncs_1040_G30Y
ncs_1040_G40Y
ncs_1040_G50Y
ncs_1040_G60Y
ncs_1040_G70Y
ncs_1040_G80Y
ncs_1040_G90Y
ncs_1040_R
ncs_1040_R10B
ncs_1040_R20B
ncs_1040_R30B
ncs_1040_R40B
ncs_1040_R50B
ncs_1040_R60B
ncs_1040_R70B
ncs_1040_R80B
ncs_1040_R90B
ncs_1040_Y
ncs_1040_Y10R
ncs_1040_Y20R
ncs_1040_Y30R
ncs_1040_Y40R
ncs_1040_Y50R
ncs_1040_Y60R
ncs_1040_Y70R
ncs_1040_Y80R
ncs_1040_Y90R
ncs_1050_B
ncs_1050_B10G
ncs_1050_B20G
ncs_1050_B30G
ncs_1050_B40G
ncs_1050_B50G
ncs_1050_B60G
ncs_1050_B70G
ncs_1050_B80G
ncs_1050_B90G
ncs_1050_G
ncs_1050_G10Y
ncs_1050_G20Y
ncs_1050_G30Y
ncs_1050_G40Y
ncs_1050_G50Y
ncs_1050_G60Y
ncs_1050_G70Y
ncs_1050_G80Y
ncs_1050_G90Y
ncs_1050_R
ncs_1050_R10B
ncs_1050_R20B
ncs_1050_R30B
ncs_1050_R40B
ncs_1050_R90B
ncs_1050_Y
ncs_1050_Y10R
ncs_1050_Y20R
ncs_1050_Y30R
ncs_1050_Y40R
ncs_1050_Y50R
ncs_1050_Y60R
ncs_1050_Y70R
ncs_1050_Y80R
ncs_1050_Y90R
ncs_1055_B90G
ncs_1060_B
ncs_1060_G
ncs_1060_G10Y
ncs_1060_G20Y
ncs_1060_G30Y
ncs_1060_G40Y
ncs_1060_G50Y
ncs_1060_G60Y
ncs_1060_G70Y
ncs_1060_G80Y
ncs_1060_G90Y
ncs_1060_R
ncs_1060_R10B
ncs_1060_R20B
ncs_1060_R30B
ncs_1060_Y
ncs_1060_Y10R
ncs_1060_Y20R
ncs_1060_Y30R
ncs_1060_Y40R
ncs_1060_Y50R
ncs_1060_Y60R
ncs_1060_Y70R
ncs_1060_Y80R
ncs_1060_Y90R
ncs_1070_G10Y
ncs_1070_G20Y
ncs_1070_G30Y
ncs_1070_G40Y
ncs_1070_G50Y
ncs_1070_G60Y
ncs_1070_G70Y
ncs_1070_G80Y
ncs_1070_G90Y
ncs_1070_R
ncs_1070_R10B
ncs_1070_R20B
ncs_1070_Y
ncs_1070_Y10R
ncs_1070_Y20R
ncs_1070_Y30R
ncs_1070_Y40R
ncs_1070_Y50R
ncs_1070_Y60R
ncs_1070_Y70R
ncs_1070_Y80R
ncs_1070_Y90R
ncs_1075_G20Y
ncs_1075_G40Y
ncs_1075_G50Y
ncs_1075_G60Y
ncs_1075_G70Y
ncs_1075_G80Y
ncs_1075_G90Y
ncs_1080_G30Y
ncs_1080_R
ncs_1080_Y
ncs_1080_Y10R
ncs_1080_Y20R
ncs_1080_Y30R
ncs_1080_Y40R
ncs_1080_Y50R
ncs_1080_Y60R
ncs_1080_Y70R
ncs_1080_Y80R
ncs_1080_Y90R
ncs_1085_Y80R
ncs_1085_Y90R
ncs_1500_N
ncs_1502_B
ncs_1502_B50G
ncs_1502_G
ncs_1502_G50Y
ncs_1502_R
ncs_1502_R50B
ncs_1502_Y
ncs_1502_Y50R
ncs_1505_G80Y
ncs_1505_G90Y
ncs_1505_Y
ncs_1505_Y10R
ncs_1505_Y20R
ncs_1505_Y30R
ncs_1505_Y40R
ncs_1505_Y50R
ncs_1505_Y60R
ncs_1505_Y70R
ncs_1505_Y80R
ncs_1505_Y90R
ncs_1510_B
ncs_1510_B20G
ncs_1510_B50G
ncs_1510_B80G
ncs_1510_G
ncs_1510_G20Y
ncs_1510_G40Y
ncs_1510_G60Y
ncs_1510_G80Y
ncs_1510_G90Y
ncs_1510_R
ncs_1510_R10B
ncs_1510_R20B
ncs_1510_R40B
ncs_1510_R60B
ncs_1510_R80B
ncs_1510_R90B
ncs_1510_Y
ncs_1510_Y10R
ncs_1510_Y20R
ncs_1510_Y30R
ncs_1510_Y40R
ncs_1510_Y50R
ncs_1510_Y60R
ncs_1510_Y70R
ncs_1510_Y80R
ncs_1510_Y90R
ncs_1515_B
ncs_1515_B20G
ncs_1515_B50G
ncs_1515_B80G
ncs_1515_G
ncs_1515_G20Y
ncs_1515_G40Y
ncs_1515_G60Y
ncs_1515_G80Y
ncs_1515_G90Y
ncs_1515_R
ncs_1515_R10B
ncs_1515_R20B
ncs_1515_R40B
ncs_1515_R60B
ncs_1515_R80B
ncs_1515_R90B
ncs_1515_Y
ncs_1515_Y10R
ncs_1515_Y20R
ncs_1515_Y30R
ncs_1515_Y40R
ncs_1515_Y50R
ncs_1515_Y60R
ncs_1515_Y70R
ncs_1515_Y80R
ncs_1515_Y90R
ncs_1550_R70B
ncs_1550_R80B
ncs_1555_B10G
ncs_1555_R70B
ncs_1555_R80B
ncs_1560_R90B
ncs_1565_B
ncs_1565_G
ncs_1575_R10B
ncs_1580_R
ncs_1580_Y80R
ncs_1580_Y90R
ncs_2000_N
ncs_2002_B
ncs_2002_B50G
ncs_2002_G
ncs_2002_G50Y
ncs_2002_R
ncs_2002_R50B
ncs_2002_Y
ncs_2002_Y50R
ncs_2005_B
ncs_2005_B20G
ncs_2005_B50G
ncs_2005_B80G
ncs_2005_G
ncs_2005_G10Y
ncs_2005_G20Y
ncs_2005_G30Y
ncs_2005_G40Y
ncs_2005_G50Y
ncs_2005_G60Y
ncs_2005_G70Y
ncs_2005_G80Y
ncs_2005_G90Y
ncs_2005_R
ncs_2005_R10B
ncs_2005_R20B
ncs_2005_R30B
ncs_2005_R40B
ncs_2005_R50B
ncs_2005_R60B
ncs_2005_R70B
ncs_2005_R80B
ncs_2005_R90B
ncs_2005_Y
ncs_2005_Y10R
ncs_2005_Y20R
ncs_2005_Y30R
ncs_2005_Y40R
ncs_2005_Y50R
ncs_2005_Y60R
ncs_2005_Y70R
ncs_2005_Y80R
ncs_2005_Y90R
ncs_2010_B
ncs_2010_B10G
ncs_2010_B30G
ncs_2010_B50G
ncs_2010_B70G
ncs_2010_B90G
ncs_2010_G
ncs_2010_G10Y
ncs_2010_G20Y
ncs_2010_G30Y
ncs_2010_G40Y
ncs_2010_G50Y
ncs_2010_G60Y
ncs_2010_G70Y
ncs_2010_G80Y
ncs_2010_G90Y
ncs_2010_R
ncs_2010_R10B
ncs_2010_R20B
ncs_2010_R30B
ncs_2010_R40B
ncs_2010_R50B
ncs_2010_R60B
ncs_2010_R70B
ncs_2010_R80B
ncs_2010_R90B
ncs_2010_Y
ncs_2010_Y10R
ncs_2010_Y20R
ncs_2010_Y30R
ncs_2010_Y40R
ncs_2010_Y50R
ncs_2010_Y60R
ncs_2010_Y70R
ncs_2010_Y80R
ncs_2010_Y90R
ncs_2020_B
ncs_2020_B10G
ncs_2020_B30G
ncs_2020_B40G
ncs_2020_B50G
ncs_2020_B60G
ncs_2020_B70G
ncs_2020_B90G
ncs_2020_G
ncs_2020_G10Y
ncs_2020_G20Y
ncs_2020_G30Y
ncs_2020_G40Y
ncs_2020_G50Y
ncs_2020_G60Y
ncs_2020_G70Y
ncs_2020_G80Y
ncs_2020_G90Y
ncs_2020_R
ncs_2020_R10B
ncs_2020_R20B
ncs_2020_R30B
ncs_2020_R40B
ncs_2020_R50B
ncs_2020_R60B
ncs_2020_R70B
ncs_2020_R80B
ncs_2020_R90B
ncs_2020_Y
ncs_2020_Y10R
ncs_2020_Y20R
ncs_2020_Y30R
ncs_2020_Y40R
ncs_2020_Y50R
ncs_2020_Y60R
ncs_2020_Y70R
ncs_2020_Y80R
ncs_2020_Y90R
ncs_2030_B
ncs_2030_B10G
ncs_2030_B30G
ncs_2030_B40G
ncs_2030_B50G
ncs_2030_B60G
ncs_2030_B70G
ncs_2030_B90G
ncs_2030_G
ncs_2030_G10Y
ncs_2030_G20Y
ncs_2030_G30Y
ncs_2030_G40Y
ncs_2030_G50Y
ncs_2030_G60Y
ncs_2030_G70Y
ncs_2030_G80Y
ncs_2030_G90Y
ncs_2030_R
ncs_2030_R10B
ncs_2030_R20B
ncs_2030_R30B
ncs_2030_R40B
ncs_2030_R50B
ncs_2030_R60B
ncs_2030_R70B
ncs_2030_R80B
ncs_2030_R90B
ncs_2030_Y
ncs_2030_Y10R
ncs_2030_Y20R
ncs_2030_Y30R
ncs_2030_Y40R
ncs_2030_Y50R
ncs_2030_Y60R
ncs_2030_Y70R
ncs_2030_Y80R
ncs_2030_Y90R
ncs_2040_B
ncs_2040_B10G
ncs_2040_B20G
ncs_2040_B30G
ncs_2040_B40G
ncs_2040_B50G
ncs_2040_B60G
ncs_2040_B70G
ncs_2040_B80G
ncs_2040_B90G
ncs_2040_G
ncs_2040_G10Y
ncs_2040_G20Y
ncs_2040_G30Y
ncs_2040_G40Y
ncs_2040_G50Y
ncs_2040_G60Y
ncs_2040_G70Y
ncs_2040_G80Y
ncs_2040_G90Y
ncs_2040_R
ncs_2040_R10B
ncs_2040_R20B
ncs_2040_R30B
ncs_2040_R40B
ncs_2040_R50B
ncs_2040_R60B
ncs_2040_R70B
ncs_2040_R80B
ncs_2040_R90B
ncs_2040_Y
ncs_2040_Y10R
ncs_2040_Y20R
ncs_2040_Y30R
ncs_2040_Y40R
ncs_2040_Y50R
ncs_2040_Y60R
ncs_2040_Y70R
ncs_2040_Y80R
ncs_2040_Y90R
ncs_2050_B
ncs_2050_B10G
ncs_2050_B20G
ncs_2050_B30G
ncs_2050_B40G
ncs_2050_B50G
ncs_2050_B60G
ncs_2050_B70G
ncs_2050_B80G
ncs_2050_B90G
ncs_2050_G
ncs_2050_G10Y
ncs_2050_G20Y
ncs_2050_G30Y
ncs_2050_G40Y
ncs_2050_G50Y
ncs_2050_G60Y
ncs_2050_G70Y
ncs_2050_G80Y
ncs_2050_G90Y
ncs_2050_R
ncs_2050_R10B
ncs_2050_R20B
ncs_2050_R30B
ncs_2050_R40B
ncs_2050_R50B
ncs_2050_R60B
ncs_2050_R70B
ncs_2050_R80B
ncs_2050_R90B
ncs_2050_Y
ncs_2050_Y10R
ncs_2050_Y20R
ncs_2050_Y30R
ncs_2050_Y40R
ncs_2050_Y50R
ncs_2050_Y60R
ncs_2050_Y70R
ncs_2050_Y80R
ncs_2050_Y90R
ncs_2055_B10G
ncs_2060_B
ncs_2060_B50G
ncs_2060_B70G
ncs_2060_B90G
ncs_2060_G
ncs_2060_G10Y
ncs_2060_G20Y
ncs_2060_G30Y
ncs_2060_G40Y
ncs_2060_G50Y
ncs_2060_G60Y
ncs_2060_G70Y
ncs_2060_G80Y
ncs_2060_G90Y
ncs_2060_R
ncs_2060_R10B
ncs_2060_R20B
ncs_2060_R30B
ncs_2060_R40B
ncs_2060_R70B
ncs_2060_R80B
ncs_2060_R90B
ncs_2060_Y
ncs_2060_Y10R
ncs_2060_Y20R
ncs_2060_Y30R
ncs_2060_Y40R
ncs_2060_Y50R
ncs_2060_Y60R
ncs_2060_Y70R
ncs_2060_Y80R
ncs_2060_Y90R
ncs_2065_B
ncs_2065_R20B
ncs_2065_R90B
ncs_2070_G10Y
ncs_2070_G20Y
ncs_2070_G30Y
ncs_2070_G40Y
ncs_2070_G50Y
ncs_2070_G60Y
ncs_2070_G70Y
ncs_2070_G80Y
ncs_2070_G90Y
ncs_2070_R
ncs_2070_R10B
ncs_2070_Y
ncs_2070_Y10R
ncs_2070_Y20R
ncs_2070_Y30R
ncs_2070_Y40R
ncs_2070_Y50R
ncs_2070_Y60R
ncs_2070_Y70R
ncs_2070_Y80R
ncs_2070_Y90R
ncs_2075_G20Y
ncs_2075_G30Y
ncs_2075_Y60R
ncs_2075_Y70R
ncs_2500_N
ncs_2502_B
ncs_2502_G
ncs_2502_R
ncs_2502_Y
ncs_2555_B20G
ncs_2555_B30G
ncs_2555_B40G
ncs_2555_B60G
ncs_2555_B80G
ncs_2565_G
ncs_2565_R80B
ncs_2570_G20Y
ncs_2570_G30Y
ncs_2570_R
ncs_2570_Y30R
ncs_2570_Y40R
ncs_2570_Y50R
ncs_2570_Y60R
ncs_2570_Y70R
ncs_2570_Y80R
ncs_2570_Y90R
ncs_3000_N
ncs_3005_B20G
ncs_3005_B80G
ncs_3005_G20Y
ncs_3005_G50Y
ncs_3005_G80Y
ncs_3005_R20B
ncs_3005_R50B
ncs_3005_R80B
ncs_3005_Y20R
ncs_3005_Y50R
ncs_3005_Y80R
ncs_3010_B
ncs_3010_B10G
ncs_3010_B30G
ncs_3010_B50G
ncs_3010_B70G
ncs_3010_B90G
ncs_3010_G
ncs_3010_G10Y
ncs_3010_G20Y
ncs_3010_G30Y
ncs_3010_G40Y
ncs_3010_G50Y
ncs_3010_G60Y
ncs_3010_G70Y
ncs_3010_G80Y
ncs_3010_G90Y
ncs_3010_R
ncs_3010_R10B
ncs_3010_R20B
ncs_3010_R30B
ncs_3010_R40B
ncs_3010_R50B
ncs_3010_R60B
ncs_3010_R70B
ncs_3010_R80B
ncs_3010_R90B
ncs_3010_Y
ncs_3010_Y10R
ncs_3010_Y20R
ncs_3010_Y30R
ncs_3010_Y40R
ncs_3010_Y50R
ncs_3010_Y60R
ncs_3010_Y70R
ncs_3010_Y80R
ncs_3010_Y90R
ncs_3020_B
ncs_3020_B10G
ncs_3020_B30G
ncs_3020_B40G
ncs_3020_B50G
ncs_3020_B60G
ncs_3020_B70G
ncs_3020_B90G
ncs_3020_G
ncs_3020_G10Y
ncs_3020_G20Y
ncs_3020_G30Y
ncs_3020_G40Y
ncs_3020_G50Y
ncs_3020_G60Y
ncs_3020_G70Y
ncs_3020_G80Y
ncs_3020_G90Y
ncs_3020_R
ncs_3020_R10B
ncs_3020_R20B
ncs_3020_R30B
ncs_3020_R40B
ncs_3020_R50B
ncs_3020_R60B
ncs_3020_R70B
ncs_3020_R80B
ncs_3020_R90B
ncs_3020_Y
ncs_3020_Y10R
ncs_3020_Y20R
ncs_3020_Y30R
ncs_3020_Y40R
ncs_3020_Y50R
ncs_3020_Y60R
ncs_3020_Y70R
ncs_3020_Y80R
ncs_3020_Y90R
ncs_3030_B
ncs_3030_B10G
ncs_3030_B30G
ncs_3030_B40G
ncs_3030_B50G
ncs_3030_B60G
ncs_3030_B70G
ncs_3030_B90G
ncs_3030_G
ncs_3030_G10Y
ncs_3030_G20Y
ncs_3030_G30Y
ncs_3030_G40Y
ncs_3030_G50Y
ncs_3030_G60Y
ncs_3030_G70Y
ncs_3030_G80Y
ncs_3030_G90Y
ncs_3030_R
ncs_3030_R10B
ncs_3030_R20B
ncs_3030_R30B
ncs_3030_R40B
ncs_3030_R50B
ncs_3030_R60B
ncs_3030_R70B
ncs_3030_R80B
ncs_3030_R90B
ncs_3030_Y
ncs_3030_Y10R
ncs_3030_Y20R
ncs_3030_Y30R
ncs_3030_Y40R
ncs_3030_Y50R
ncs_3030_Y60R
ncs_3030_Y70R
ncs_3030_Y80R
ncs_3030_Y90R
ncs_3040_B
ncs_3040_B10G
ncs_3040_B20G
ncs_3040_B30G
ncs_3040_B40G
ncs_3040_B50G
ncs_3040_B60G
ncs_3040_B70G
ncs_3040_B80G
ncs_3040_B90G
ncs_3040_G
ncs_3040_G10Y
ncs_3040_G20Y
ncs_3040_G30Y
ncs_3040_G40Y
ncs_3040_G50Y
ncs_3040_G60Y
ncs_3040_G70Y
ncs_3040_G80Y
ncs_3040_G90Y
ncs_3040_R
ncs_3040_R10B
ncs_3040_R20B
ncs_3040_R30B
ncs_3040_R40B
ncs_3040_R50B
ncs_3040_R60B
ncs_3040_R70B
ncs_3040_R80B
ncs_3040_R90B
ncs_3040_Y
ncs_3040_Y10R
ncs_3040_Y20R
ncs_3040_Y30R
ncs_3040_Y40R
ncs_3040_Y50R
ncs_3040_Y60R
ncs_3040_Y70R
ncs_3040_Y80R
ncs_3040_Y90R
ncs_3050_B
ncs_3050_B10G
ncs_3050_B20G
ncs_3050_B30G
ncs_3050_B40G
ncs_3050_B50G
ncs_3050_B60G
ncs_3050_B70G
ncs_3050_B80G
ncs_3050_B90G
ncs_3050_G
ncs_3050_G10Y
ncs_3050_G20Y
ncs_3050_G30Y
ncs_3050_G40Y
ncs_3050_G50Y
ncs_3050_G60Y
ncs_3050_G70Y
ncs_3050_G80Y
ncs_3050_G90Y
ncs_3050_R
ncs_3050_R10B
ncs_3050_R20B
ncs_3050_R30B
ncs_3050_R40B
ncs_3050_R50B
ncs_3050_R60B
ncs_3050_R70B
ncs_3050_R80B
ncs_3050_R90B
ncs_3050_Y
ncs_3050_Y10R
ncs_3050_Y20R
ncs_3050_Y30R
ncs_3050_Y40R
ncs_3050_Y50R
ncs_3050_Y60R
ncs_3050_Y70R
ncs_3050_Y80R
ncs_3050_Y90R
ncs_3055_B50G
ncs_3055_R30B
ncs_3055_R40B
ncs_3055_R50B
ncs_3060_B
ncs_3060_B10G
ncs_3060_B20G
ncs_3060_B30G
ncs_3060_B40G
ncs_3060_B70G
ncs_3060_B90G
ncs_3060_G
ncs_3060_G10Y
ncs_3060_G20Y
ncs_3060_G30Y
ncs_3060_G40Y
ncs_3060_G50Y
ncs_3060_G60Y
ncs_3060_G70Y
ncs_3060_G80Y
ncs_3060_G90Y
ncs_3060_R
ncs_3060_R10B
ncs_3060_R20B
ncs_3060_R70B
ncs_3060_R80B
ncs_3060_R90B
ncs_3060_Y
ncs_3060_Y10R
ncs_3060_Y20R
ncs_3060_Y30R
ncs_3060_Y40R
ncs_3060_Y50R
ncs_3060_Y60R
ncs_3060_Y70R
ncs_3060_Y80R
ncs_3060_Y90R
ncs_3065_G10Y
ncs_3065_G40Y
ncs_3065_G50Y
ncs_3065_G60Y
ncs_3065_R90B
ncs_3065_Y20R
ncs_3500_N
ncs_3502_B
ncs_3502_G
ncs_3502_R
ncs_3502_Y
ncs_3555_B60G
ncs_3555_B80G
ncs_3555_R60B
ncs_3560_G
ncs_3560_G10Y
ncs_3560_G20Y
ncs_3560_G30Y
ncs_3560_G40Y
ncs_3560_G50Y
ncs_3560_G60Y
ncs_3560_G70Y
ncs_3560_R
ncs_3560_R80B
ncs_3560_R90B
ncs_3560_Y
ncs_3560_Y20R
ncs_3560_Y30R
ncs_3560_Y40R
ncs_3560_Y50R
ncs_3560_Y60R
ncs_3560_Y70R
ncs_3560_Y80R
ncs_3560_Y90R
ncs_4000_N
ncs_4005_B20G
ncs_4005_B80G
ncs_4005_G20Y
ncs_4005_G50Y
ncs_4005_G80Y
ncs_4005_R20B
ncs_4005_R50B
ncs_4005_R80B
ncs_4005_Y20R
ncs_4005_Y50R
ncs_4005_Y80R
ncs_4010_B10G
ncs_4010_B30G
ncs_4010_B50G
ncs_4010_B70G
ncs_4010_B90G
ncs_4010_G10Y
ncs_4010_G30Y
ncs_4010_G50Y
ncs_4010_G70Y
ncs_4010_G90Y
ncs_4010_R10B
ncs_4010_R30B
ncs_4010_R50B
ncs_4010_R70B
ncs_4010_R90B
ncs_4010_Y10R
ncs_4010_Y30R
ncs_4010_Y50R
ncs_4010_Y70R
ncs_4010_Y90R
ncs_4020_B
ncs_4020_B10G
ncs_4020_B30G
ncs_4020_B50G
ncs_4020_B70G
ncs_4020_B90G
ncs_4020_G
ncs_4020_G10Y
ncs_4020_G30Y
ncs_4020_G50Y
ncs_4020_G70Y
ncs_4020_G90Y
ncs_4020_R
ncs_4020_R10B
ncs_4020_R20B
ncs_4020_R30B
ncs_4020_R40B
ncs_4020_R50B
ncs_4020_R60B
ncs_4020_R70B
ncs_4020_R80B
ncs_4020_R90B
ncs_4020_Y
ncs_4020_Y10R
ncs_4020_Y20R
ncs_4020_Y30R
ncs_4020_Y40R
ncs_4020_Y50R
ncs_4020_Y60R
ncs_4020_Y70R
ncs_4020_Y80R
ncs_4020_Y90R
ncs_4030_B
ncs_4030_B10G
ncs_4030_B30G
ncs_4030_B50G
ncs_4030_B70G
ncs_4030_B90G
ncs_4030_G
ncs_4030_G10Y
ncs_4030_G30Y
ncs_4030_G50Y
ncs_4030_G70Y
ncs_4030_G90Y
ncs_4030_R
ncs_4030_R10B
ncs_4030_R20B
ncs_4030_R30B
ncs_4030_R40B
ncs_4030_R50B
ncs_4030_R60B
ncs_4030_R70B
ncs_4030_R80B
ncs_4030_R90B
ncs_4030_Y
ncs_4030_Y10R
ncs_4030_Y20R
ncs_4030_Y30R
ncs_4030_Y40R
ncs_4030_Y50R
ncs_4030_Y60R
ncs_4030_Y70R
ncs_4030_Y80R
ncs_4030_Y90R
ncs_4040_B
ncs_4040_B10G
ncs_4040_B20G
ncs_4040_B30G
ncs_4040_B40G
ncs_4040_B50G
ncs_4040_B60G
ncs_4040_B70G
ncs_4040_B80G
ncs_4040_B90G
ncs_4040_G
ncs_4040_G10Y
ncs_4040_G20Y
ncs_4040_G30Y
ncs_4040_G40Y
ncs_4040_G50Y
ncs_4040_G60Y
ncs_4040_G70Y
ncs_4040_G80Y
ncs_4040_G90Y
ncs_4040_R
ncs_4040_R10B
ncs_4040_R20B
ncs_4040_R30B
ncs_4040_R40B
ncs_4040_R50B
ncs_4040_R60B
ncs_4040_R70B
ncs_4040_R80B
ncs_4040_R90B
ncs_4040_Y
ncs_4040_Y10R
ncs_4040_Y20R
ncs_4040_Y30R
ncs_4040_Y40R
ncs_4040_Y50R
ncs_4040_Y60R
ncs_4040_Y70R
ncs_4040_Y80R
ncs_4040_Y90R
ncs_4050_B
ncs_4050_B10G
ncs_4050_B20G
ncs_4050_B30G
ncs_4050_B40G
ncs_4050_B50G
ncs_4050_B60G
ncs_4050_B70G
ncs_4050_B80G
ncs_4050_B90G
ncs_4050_G
ncs_4050_G10Y
ncs_4050_G20Y
ncs_4050_G30Y
ncs_4050_G40Y
ncs_4050_G50Y
ncs_4050_G60Y
ncs_4050_G70Y
ncs_4050_G80Y
ncs_4050_G90Y
ncs_4050_R
ncs_4050_R10B
ncs_4050_R20B
ncs_4050_R30B
ncs_4050_R40B
ncs_4050_R50B
ncs_4050_R60B
ncs_4050_R70B
ncs_4050_R80B
ncs_4050_R90B
ncs_4050_Y
ncs_4050_Y10R
ncs_4050_Y20R
ncs_4050_Y30R
ncs_4050_Y40R
ncs_4050_Y50R
ncs_4050_Y60R
ncs_4050_Y70R
ncs_4050_Y80R
ncs_4050_Y90R
ncs_4055_B
ncs_4055_B40G
ncs_4055_R70B
ncs_4055_R95B
ncs_4055_Y10R
ncs_4500_N
ncs_4502_B
ncs_4502_G
ncs_4502_R
ncs_4502_Y
ncs_4550_B
ncs_4550_B20G
ncs_4550_B30G
ncs_4550_B40G
ncs_4550_B50G
ncs_4550_B80G
ncs_4550_B90G
ncs_4550_G
ncs_4550_G10Y
ncs_4550_G20Y
ncs_4550_G30Y
ncs_4550_G40Y
ncs_4550_G50Y
ncs_4550_G60Y
ncs_4550_G70Y
ncs_4550_R70B
ncs_4550_R80B
ncs_4550_R90B
ncs_4550_Y
ncs_4550_Y30R
ncs_4550_Y40R
ncs_4550_Y50R
ncs_4550_Y60R
ncs_4550_Y70R
ncs_4550_Y80R
ncs_4550_Y90R
ncs_5000_N
ncs_5005_B20G
ncs_5005_B80G
ncs_5005_G20Y
ncs_5005_G50Y
ncs_5005_G80Y
ncs_5005_R20B
ncs_5005_R50B
ncs_5005_R80B
ncs_5005_Y20R
ncs_5005_Y50R
ncs_5005_Y80R
ncs_5010_B10G
ncs_5010_B30G
ncs_5010_B50G
ncs_5010_B70G
ncs_5010_B90G
ncs_5010_G10Y
ncs_5010_G30Y
ncs_5010_G50Y
ncs_5010_G70Y
ncs_5010_G90Y
ncs_5010_R10B
ncs_5010_R30B
ncs_5010_R50B
ncs_5010_R70B
ncs_5010_R90B
ncs_5010_Y10R
ncs_5010_Y30R
ncs_5010_Y50R
ncs_5010_Y70R
ncs_5010_Y90R
ncs_5020_B
ncs_5020_B10G
ncs_5020_B30G
ncs_5020_B50G
ncs_5020_B70G
ncs_5020_B90G
ncs_5020_G
ncs_5020_G10Y
ncs_5020_G30Y
ncs_5020_G50Y
ncs_5020_G70Y
ncs_5020_G90Y
ncs_5020_R
ncs_5020_R10B
ncs_5020_R20B
ncs_5020_R30B
ncs_5020_R40B
ncs_5020_R50B
ncs_5020_R60B
ncs_5020_R70B
ncs_5020_R80B
ncs_5020_R90B
ncs_5020_Y
ncs_5020_Y10R
ncs_5020_Y20R
ncs_5020_Y30R
ncs_5020_Y40R
ncs_5020_Y50R
ncs_5020_Y60R
ncs_5020_Y70R
ncs_5020_Y80R
ncs_5020_Y90R
ncs_5030_B
ncs_5030_B10G
ncs_5030_B30G
ncs_5030_B50G
ncs_5030_B70G
ncs_5030_B90G
ncs_5030_G
ncs_5030_G10Y
ncs_5030_G30Y
ncs_5030_G50Y
ncs_5030_G70Y
ncs_5030_G90Y
ncs_5030_R
ncs_5030_R10B
ncs_5030_R20B
ncs_5030_R30B
ncs_5030_R40B
ncs_5030_R50B
ncs_5030_R60B
ncs_5030_R70B
ncs_5030_R80B
ncs_5030_R90B
ncs_5030_Y
ncs_5030_Y10R
ncs_5030_Y20R
ncs_5030_Y30R
ncs_5030_Y40R
ncs_5030_Y50R
ncs_5030_Y60R
ncs_5030_Y70R
ncs_5030_Y80R
ncs_5030_Y90R
ncs_5040_B
ncs_5040_B10G
ncs_5040_B20G
ncs_5040_B30G
ncs_5040_B40G
ncs_5040_B50G
ncs_5040_B60G
ncs_5040_B70G
ncs_5040_B80G
ncs_5040_B90G
ncs_5040_G
ncs_5040_G10Y
ncs_5040_G20Y
ncs_5040_G30Y
ncs_5040_G40Y
ncs_5040_G50Y
ncs_5040_G60Y
ncs_5040_G70Y
ncs_5040_G80Y
ncs_5040_G90Y
ncs_5040_R
ncs_5040_R10B
ncs_5040_R20B
ncs_5040_R30B
ncs_5040_R40B
ncs_5040_R50B
ncs_5040_R60B
ncs_5040_R70B
ncs_5040_R80B
ncs_5040_R90B
ncs_5040_Y
ncs_5040_Y10R
ncs_5040_Y20R
ncs_5040_Y30R
ncs_5040_Y40R
ncs_5040_Y50R
ncs_5040_Y60R
ncs_5040_Y70R
ncs_5040_Y80R
ncs_5040_Y90R
ncs_5045_B10G
ncs_5500_N
ncs_5502_B
ncs_5502_G
ncs_5502_R
ncs_5502_Y
ncs_5540_B
ncs_5540_B10G
ncs_5540_B20G
ncs_5540_B30G
ncs_5540_B40G
ncs_5540_B50G
ncs_5540_B80G
ncs_5540_B90G
ncs_5540_G
ncs_5540_G10Y
ncs_5540_G20Y
ncs_5540_G30Y
ncs_5540_G40Y
ncs_5540_G50Y
ncs_5540_G60Y
ncs_5540_G70Y
ncs_5540_R70B
ncs_5540_R90B
ncs_5540_Y90R
ncs_6000_N
ncs_6005_B20G
ncs_6005_B80G
ncs_6005_G20Y
ncs_6005_G50Y
ncs_6005_G80Y
ncs_6005_R20B
ncs_6005_R50B
ncs_6005_R80B
ncs_6005_Y20R
ncs_6005_Y50R
ncs_6005_Y80R
ncs_6010_B10G
ncs_6010_B30G
ncs_6010_B50G
ncs_6010_B70G
ncs_6010_B90G
ncs_6010_G10Y
ncs_6010_G30Y
ncs_6010_G50Y
ncs_6010_G70Y
ncs_6010_G90Y
ncs_6010_R10B
ncs_6010_R30B
ncs_6010_R50B
ncs_6010_R70B
ncs_6010_R90B
ncs_6010_Y10R
ncs_6010_Y30R
ncs_6010_Y50R
ncs_6010_Y70R
ncs_6010_Y90R
ncs_6020_B
ncs_6020_B10G
ncs_6020_B30G
ncs_6020_B50G
ncs_6020_B70G
ncs_6020_B90G
ncs_6020_G
ncs_6020_G10Y
ncs_6020_G30Y
ncs_6020_G50Y
ncs_6020_G70Y
ncs_6020_G90Y
ncs_6020_R
ncs_6020_R10B
ncs_6020_R20B
ncs_6020_R30B
ncs_6020_R40B
ncs_6020_R50B
ncs_6020_R60B
ncs_6020_R70B
ncs_6020_R80B
ncs_6020_R90B
ncs_6020_Y
ncs_6020_Y10R
ncs_6020_Y20R
ncs_6020_Y30R
ncs_6020_Y40R
ncs_6020_Y50R
ncs_6020_Y60R
ncs_6020_Y70R
ncs_6020_Y80R
ncs_6020_Y90R
ncs_6030_B
ncs_6030_B10G
ncs_6030_B30G
ncs_6030_B50G
ncs_6030_B70G
ncs_6030_B90G
ncs_6030_G
ncs_6030_G10Y
ncs_6030_G30Y
ncs_6030_G50Y
ncs_6030_G70Y
ncs_6030_G90Y
ncs_6030_R
ncs_6030_R10B
ncs_6030_R20B
ncs_6030_R30B
ncs_6030_R40B
ncs_6030_R50B
ncs_6030_R60B
ncs_6030_R70B
ncs_6030_R80B
ncs_6030_R90B
ncs_6030_Y
ncs_6030_Y10R
ncs_6030_Y20R
ncs_6030_Y30R
ncs_6030_Y40R
ncs_6030_Y50R
ncs_6030_Y60R
ncs_6030_Y70R
ncs_6030_Y80R
ncs_6030_Y90R
ncs_6035_B60G
ncs_6500_N
ncs_6502_B
ncs_6502_G
ncs_6502_R
ncs_6502_Y
ncs_6530_B30G
ncs_6530_B50G
ncs_6530_G10Y
ncs_6530_G50Y
ncs_7000_N
ncs_7005_B20G
ncs_7005_B80G
ncs_7005_G20Y
ncs_7005_G50Y
ncs_7005_G80Y
ncs_7005_R20B
ncs_7005_R50B
ncs_7005_R80B
ncs_7005_Y20R
ncs_7005_Y50R
ncs_7005_Y80R
ncs_7010_B10G
ncs_7010_B30G
ncs_7010_B50G
ncs_7010_B70G
ncs_7010_B90G
ncs_7010_G10Y
ncs_7010_G30Y
ncs_7010_G50Y
ncs_7010_G70Y
ncs_7010_G90Y
ncs_7010_R10B
ncs_7010_R30B
ncs_7010_R50B
ncs_7010_R70B
ncs_7010_R90B
ncs_7010_Y10R
ncs_7010_Y30R
ncs_7010_Y50R
ncs_7010_Y70R
ncs_7010_Y90R
ncs_7020_B
ncs_7020_B10G
ncs_7020_B30G
ncs_7020_B50G
ncs_7020_B70G
ncs_7020_B90G
ncs_7020_G
ncs_7020_G10Y
ncs_7020_G30Y
ncs_7020_G50Y
ncs_7020_G70Y
ncs_7020_G90Y
ncs_7020_R
ncs_7020_R10B
ncs_7020_R20B
ncs_7020_R30B
ncs_7020_R40B
ncs_7020_R50B
ncs_7020_R60B
ncs_7020_R70B
ncs_7020_R80B
ncs_7020_R90B
ncs_7020_Y
ncs_7020_Y10R
ncs_7020_Y20R
ncs_7020_Y30R
ncs_7020_Y40R
ncs_7020_Y50R
ncs_7020_Y60R
ncs_7020_Y70R
ncs_7020_Y80R
ncs_7020_Y90R
ncs_7500_N
ncs_7502_B
ncs_7502_G
ncs_7502_R
ncs_7502_Y
ncs_8000_N
ncs_8005_B20G
ncs_8005_B80G
ncs_8005_G20Y
ncs_8005_G50Y
ncs_8005_G80Y
ncs_8005_R20B
ncs_8005_R50B
ncs_8005_R80B
ncs_8005_Y20R
ncs_8005_Y50R
ncs_8005_Y80R
ncs_8010_B10G
ncs_8010_B30G
ncs_8010_B50G
ncs_8010_B70G
ncs_8010_B90G
ncs_8010_G10Y
ncs_8010_G30Y
ncs_8010_G50Y
ncs_8010_G70Y
ncs_8010_G90Y
ncs_8010_R10B
ncs_8010_R30B
ncs_8010_R50B
ncs_8010_R70B
ncs_8010_R90B
ncs_8010_Y10R
ncs_8010_Y30R
ncs_8010_Y50R
ncs_8010_Y70R
ncs_8010_Y90R
ncs_8500_N
ncs_8502_B
ncs_8502_G
ncs_8502_R
ncs_8502_Y
ncs_8505_B20G
ncs_8505_B80G
ncs_8505_G20Y
ncs_8505_G80Y
ncs_8505_R20B
ncs_8505_R80B
ncs_8505_Y20R
ncs_8505_Y80R

Resene Color Table

Color Info:
CSpec: -
Hex: -
RGB: -
acadia
acapulco
acorn
aeroblue
affair
afghantan
akaroa
alabaster
albescentwhite
alerttan
allports
almondfrost
alpine
alto
aluminium
amazon
americano
amethystsmoke
amour
amulet
anakiwa
antiquebrass
anzac
apache
apple
appleblossom
applegreen
apricot
apricotwhite
aqua
aquahaze
aquamarine
aquaspring
aquasqueeze
arapawa
armadillo
arrowtown
ash
ashbrown
asphalt
astra
astral
astronaut
astronautblue
athensgrey
athsspecial
atlantis
atoll
atomic
aubergine
auchico
australianmint
avocado
axolotl
azalea
aztec
azure
bahamablue
bahia
bajawhite
balihai
balticsea
bamboo
bandicoot
banjul
barberry
barleycorn
barleywhite
barossa
bastille
battleshipgrey
bayleaf
bayofmany
bazaar
bean
beautybush
beeswax
bermuda
bermudagrey
berylgreen
bianca
bigstone
bilbao
bilobaflower
birch
birdflower
biscay
bismark
bisonhide
bitter
bitterlemon
bizarre
blackbean
blackberry
blackcurrant
blackforest
blackhaze
blackmagic
blackmarlin
blackpearl
blackpepper
blackrock
blackrose
blackrussian
blacksqueeze
blackwhite
blackwood
blanc
bleachedcedar
bleachwhite
blossom
bluebark
bluebayoux
bluebell
bluechalk
bluecharcoal
bluechill
bluediamond
bluedianne
bluegem
bluehaze
bluelagoon
bluemarguerite
blueromance
bluesmoke
bluestone
bluewhale
bluezodiac
blumine
blush
bokaragrey
bombay
bondiblue
bone
bonjour
bordeaux
bossanova
bostonblue
botticelli
bottlegreen
boulder
bouquet
bourbon
bracken
brandy
brandypunch
brandyrose
brazil
breakerbay
bridalheath
bridesmaid
brightgrey
brightred
brightsun
bronco
bronze
bronzeolive
bronzetone
broom
brownbramble
brownderby
brownpod
bubbles
buccaneer
bud
buddhagold
bulgarianrose
bullshot
bunker
bunting
burgundy
burnham
burningsand
burntcrimson
bush
buttercup
butteredrum
butterflybush
buttermilk
butterywhite
cabaret
cabbagepont
cabsav
cactus
cadillac
caferoyale
calico
california
calypso
camarone
camelot
cameo
camouflage
canary
cancan
candlelight
cannonblack
cannonpink
canvas
capecod
capehoney
capepalliser
caper
capri
caramel
cararra
cardinal
cardingreen
careyspink
carissma
carla
carnabytan
carouselpink
casablanca
casal
cascade
cashmere
casper
castro
catalinablue
catskillwhite
cavernpink
cedar
celery
celeste
cello
celtic
cement
ceramic
cesoir
chablis
chaletgreen
chalky
chambray
chamois
champagne
chantilly
charade
chardon
chardonnay
charlotte
charm
chateaugreen
chatelle
chathamsblue
chelseacucumber
chelseagem
chenin
cherokee
cherrypie
cherrywood
cherub
chetwodeblue
chicago
chiffon
chileanfire
chileanheath
chinaivory
chino
chinook
chocolate
christalle
christi
christine
chromewhite
cigar
cinder
cinderella
cinnamon
cioccolato
citron
citrus
clairvoyant
clamshell
claret
classicrose
claycreek
clearday
clementine
clinker
cloud
cloudburst
cloudy
clover
cobalt
cocoabean
cocoabrown
coconutcream
codgrey
coffee
coffeebean
cognac
cola
coldpurple
coldturkey
colonialwhite
comet
como
conch
concord
concrete
confetti
congobrown
conifer
contessa
coppercanyon
copperrust
coral
coralcandy
coraltree
corduroy
coriander
cork
corn
cornfield
cornflower
cornharvest
corvette
cosmic
cosmos
costadelsol
cottonseed
countygreen
covegrey
cowboy
crabapple
crail
cranberry
craterbrown
creambrulee
creamcan
cremedebanane
creole
crete
crocodile
crownofthorns
crowshead
cruise
crusoe
crusta
cubantan
cumin
cumulus
cupid
curiousblue
cuttysark
cyprus
daintree
dairycream
daisybush
dallas
danube
darkebony
darkoak
darkrimu
darkrum
darkslate
darktan
dawn
dawnpink
deco
deepblush
deepbronze
deepcove
deepfir
deepkoamaru
deepoak
deepsea
deepteal
dell
delrio
delta
deluge
derby
desert
desertstorm
dew
deyork
diesel
dingley
disco
diserria
dixie
dolly
dolphin
domino
donjuan
donkeybrown
dorado
doublecolonialwhite
doublepearllusta
doublespanishwhite
dovegrey
downriver
downy
driftwood
drover
dune
duststorm
dustygrey
dutchwhite
eagle
earlsgreen
earlydawn
eastbay
easternblue
eastside
ebb
ebony
ebonyclay
echoblue
eclipse
ecruwhite
ecstasy
eden
edgewater
edward
eggsour
eggwhite
elephant
elfgreen
elm
elpaso
elsalva
embers
eminence
emperor
empress
endeavour
energyyellow
englishholly
englishwalnut
envy
equator
espresso
eternity
eucalyptus
eunry
eveningsea
everglade
fairpink
falcon
fantasy
fedora
feijoa
fern
fernfrond
ferra
festival
feta
fieryorange
fijigreen
finch
finlandia
finn
fiord
fire
firebush
firefly
flamenco
flamepea
flamered
flamingo
flax
flint
flirt
foam
fog
foggygrey
forestgreen
forgetmenot
fountainblue
frangipani
frenchgrey
frenchlilac
frenchpass
friargrey
fringyflower
froly
frost
frostedmint
frostee
fruitsalad
fuchsia
fuego
fuelyellow
funblue
fungreen
fuscousgrey
gablegreen
gallery
galliano
geebung
genoa
geraldine
geyser
ghost
gigas
gimblet
gin
ginfizz
givry
glacier
gladegreen
goben
goblin
golddrop
goldenbell
goldendream
goldenfizz
goldenglow
goldensand
goldentainoi
goldtips
gondola
gordonsgreen
gorse
gossamer
gossip
gothic
governorbay
grainbrown
grandis
granitegreen
grannyapple
grannysmith
grape
graphite
grasshopper
gravel
greenhouse
greenkelp
greenleaf
greenmist
greenpea
greensmoke
greenspring
greenstone
greenvogue
greenwaterloo
greenwhite
grenadier
greychateau
greygreen
greynickel
greynurse
greyolive
greysuit
guardsmanred
gulfblue
gulfstream
gullgrey
gumbo
gumleaf
gunmetal
gunpowder
gunsmoke
gurkha
hacienda
hairyheath
haiti
halfandhalf
halfbaked
halfcolonialwhite
halfdutchwhite
halfpearllusta
halfspanishwhite
hampton
harp
harvestgold
havana
havelockblue
hawaiiantan
hawkesblue
heath
heather
heatheredgrey
heavymetal
hemlock
hemp
hibiscus
highball
highland
hillary
himalaya
hintofgreen
hintofgrey
hintofred
hintofyellow
hippieblue
hippiegreen
hippiepink
hitgrey
hitpink
hokeypokey
hoki
holly
honeyflower
honeysuckle
hopbush
horizon
horsesneck
hotchile
hotcurry
hotpurple
hottoddy
hummingbird
huntergreen
hurricane
husk
iceberg
icecold
illusion
indiantan
indochine
irishcoffee
iroko
iron
ironbark
ironsidegrey
ironstone
islandspice
jacaranda
jacarta
jackobean
jacksonspurple
jade
jaffa
jaggedice
jagger
jaguar
jambalaya
janna
japaneselaurel
japanesemaple
japonica
jarrah
java
jazz
jellybean
jetstream
jewel
joanna
jon
jonquil
jordyblue
judgegrey
jumbo
junglegreen
junglemist
juniper
justright
kabul
kaitokegreen
kangaroo
karaka
karry
kashmirblue
kelp
kenyancopper
keppel
kidnapper
kilamanjaro
killarney
kimberly
kingfisherdaisy
kobi
kokoda
korma
koromiko
kournikova
kumera
lapalma
larioja
laser
laspalmas
laurel
lavender
leather
lemon
lemonginger
lemongrass
licorice
lightningyellow
lilacbush
lily
lilywhite
lima
lime
limeade
limedash
limedgum
limedoak
limedspruce
limerick
linen
linkwater
lipstick
lisbonbrown
lividbrown
loafer
loblolly
lochinvar
lochmara
locust
logan
logcabin
lola
londonhue
lonestar
lotus
loulou
lucky
luckypoint
lunargreen
lusty
luxorgold
lynch
mabel
madang
madison
madras
magnolia
mahogany
maire
maitai
maize
makara
mako
malachitegreen
malibu
mallard
malta
mamba
mandalay
mandy
mandyspink
manhattan
mantis
mantle
manz
mardigras
marigold
mariner
marlin
maroon
marshland
martini
martinique
marzipan
masala
mash
matisse
matrix
matterhorn
maverick
mckenzie
melanie
melanzane
melrose
meranti
mercury
merino
merlin
merlot
metallicbronze
metalliccopper
meteor
meteorite
mexicanred
midgrey
midnight
midnightexpress
midnightmoss
mikado
milan
milanored
milkpunch
milkwhite
millbrook
mimosa
mindaro
mineralgreen
mineshaft
ming
minsk
mintjulep
minttulip
mirage
mischka
mistgrey
mobster
moccaccino
mocha
mojo
monalisa
monarch
mondo
mongoose
monsoon
montana
montecarlo
monza
moodyblue
moonglow
moonmist
moonraker
moonyellow
morningglory
moroccobrown
mortar
mosaic
mosque
mountainmist
muddywaters
muesli
mulberry
mulefawn
mulledwine
mustard
mypink
mysin
mystic
nandor
napa
narvik
natural
nebula
negroni
nepal
neptune
nero
neutralgreen
nevada
newamber
neworleans
newyorkpink
niagara
nightclub
nightrider
nightshadz
nileblue
nobel
nomad
nordic
norway
nugget
nutmeg
oasis
observatory
oceangreen
offgreen
offyellow
oil
oiledcedar
oldbrick
oldcopper
olivegreen
olivehaze
olivetone
onahau
onion
opal
opium
oracle
orangeroughy
orangewhite
orchidwhite
oregon
orient
orientalpink
orinoco
oslogrey
ottoman
outerspace
oxfordblue
oxley
oysterbay
oysterpink
paarl
pablo
pacifika
paco
padua
paleleaf
paleoyster
paleprim
palerose
palesky
paleslate
palmgreen
palmleaf
pampas
panache
pancho
panda
paprika
paradiso
parchment
parisdaisy
parism
pariswhite
parsley
patina
pattensblue
paua
pavlova
peach
peachschnapps
peanut
pearlbush
pearllusta
peasoup
peat
pelorous
peppermint
perano
perfume
periglacialblue
persianplum
persianred
persimmon
perutan
pesto
petiteorchid
pewter
pharlap
picasso
pickledaspen
pickledbean
pickledbluewood
pictonblue
pigeonpost
pinecone
pineglade
pinetree
pinkflare
pinklace
pinklady
pinkswan
piper
pipi
pippin
pirategold
pistachio
pixiegreen
pizazz
pizza
plantation
planter
plum
pohutukawa
polar
poloblue
pompadour
porcelain
porsche
portafino
portage
portgore
portica
potpourri
pottersclay
powderblue
prairiesand
prelude
prim
primrose
promenade
provincialpink
prussianblue
pueblo
puertorico
pumice
pumpkin
punch
punga
putty
quarterpearllusta
quarterspanishwhite
quicksand
quillgrey
quincy
racinggreen
raffia
raincloud
rainee
rainforest
rajah
rangitoto
rangoongreen
raven
rebel
redbeech
redberry
reddamask
reddevil
redoxide
redrobin
redstage
redwood
reef
reefgold
regalblue
regentgrey
regentstblue
remy
renosand
resolutionblue
revolver
rhino
ribbon
ricecake
riceflower
richgold
riogrande
riptide
riverbed
robinseggblue
robroy
rock
rockblue
rocksalt
rockspray
rodeodust
rollingstone
roman
romance
romancoffee
romantic
ronchi
roofterracotta
rope
rose
rosebud
rosebudcherry
roseofsharon
rosewhite
rosewood
roti
rouge
royalheath
rum
rumswizzle
russett
rusticred
rustynail
saddle
saddlebrown
saffron
sage
sahara
sail
salem
salomie
saltbox
saltpan
sambuca
sandal
sanddune
sandrift
sandstone
sandwisp
sandybeach
sanfelix
sangria
sanguinebrown
sanjuan
sanmarino
santasgrey
santefe
sapling
sapphire
saratoga
sauvignon
sazerac
scampi
scandal
scarletgum
scarlett
scarpaflow
schist
schooner
scooter
scorpion
scotchmist
scrub
seabuckthorn
seafog
seagreen
seagull
seamist
seance
seanymph
seapink
seashell
seaweed
selago
sepia
serenade
shadowgreen
shadylady
shakespeare
shalimar
shark
sherpablue
sherwoodgreen
shilo
shinglefawn
shipcove
shipgrey
shiraz
shocking
shuttlegrey
siam
sidecar
silk
silverchalice
silversand
silvertree
sinbad
siren
sirocco
sisal
skeptic
slugger
smaltblue
smoketree
smokeyash
smoky
snowdrift
snowflurry
snowymint
snuff
soapstone
softamber
softpeach
solidpink
solitaire
solitude
sorbus
sorrellbrown
sourdough
soyabean
spaceshuttle
spanishgreen
spanishwhite
spectra
spice
spicymix
spicypink
spindle
splash
spray
springgreen
springrain
springsun
springwood
sprout
spunpearl
squirrel
stack
stardust
starkwhite
starship
steelgrey
stiletto
stinger
stonewall
stormdust
stormgrey
stratos
straw
strikemaster
stromboli
sttropaz
studio
submarine
sugarcane
sulu
summergreen
sun
sundance
sundown
sunflower
sunglo
sunset
sunshade
supernova
surf
surfcrest
surfiegreen
sushi
suvagrey
swamp
swansdown
sweetcorn
sweetpink
swirl
swisscoffee
sycamore
tabasco
tacao
tacha
tahitigold
tahunasands
tallow
tallpoppy
tamarillo
tamarind
tana
tangaroa
tangerine
tango
tapa
tapestry
tara
tarawera
tasman
taupegrey
tawnyport
taxbreak
tea
teak
tealblue
temptress
tepapagreen
tequila
texas
texasrose
thatch
thatchgreen
thistle
thunder
thunderbird
tiamaria
tiara
tiber
tidal
tide
timbergreen
titanwhite
toast
tobaccobrown
tobago
toledo
tolopea
tomthumb
tonyspink
topaz
toreabay
toryblue
tosca
totempole
touchwood
towergrey
tradewind
tranquil
travertine
treehouse
treepoppy
trendygreen
trendypink
trinidad
tropicalblue
trout
truev
tuatara
tuftbush
tuliptree
tumbleweed
tuna
tundora
turbo
turkishrose
turmeric
turtlegreen
tuscany
tusk
tussock
tutu
twilight
twilightblue
twine
valencia
valentino
valhalla
vancleef
vanilla
vanillaice
varden
venetianred
veniceblue
venus
verdigris
verdungreen
vesuvius
victoria
vidaloca
viking
vinrouge
viola
violentviolet
violet
viridiangreen
vistablue
vistawhite
visvis
volcano
voodoo
vulcan
wafer
waikawagrey
waiouru
walnut
wanwhite
wasabi
watercourse
waterleaf
waterloo
wattle
watusi
waxflower
wedgewood
wellread
wepeep
westar
westcoast
westernred
westside
wewak
wheatfield
whiskey
whiskeysour
whisper
whiteice
whitelilac
whitelinen
whitenectar
whitepointer
whiterock
wildrice
wildsand
wildwillow
william
willowbrook
willowgrove
windsor
wineberry
winterhazel
wisppink
wisteria
wistful
witchhaze
woodbark
woodburn
woodland
woodrush
woodsmoke
woodybay
woodybrown
xanadu
yellowmetal
yellowsea
yourpink
yukongold
yuma
zambezi
zanah
zest
zeus
ziggurat
zircon
zombie
zorba
zuccini
zumthor
zydeco

W3C Color Table

Color Info:
CSpec: -
Hex: -
RGB: -
aliceblue
antiquewhite
aqua
aquamarine
azure
beige
bisque
black
blanchedalmond
blue
blueviolet
brown
burlywood
cadetblue
chartreuse
chocolate
coral
cornflowerblue
cornsilk
crimson
cyan
darkblue
darkcyan
darkgoldenrod
darkgray
darkgreen
darkgrey
darkkhaki
darkmagenta
darkolivegreen
darkorange
darkorchid
darkred
darksalmon
darkseagreen
darkslateblue
darkslategray
darkslategrey
darkturquoise
darkviolet
deeppink
deepskyblue
dimgray
dimgrey
dodgerblue
firebrick
floralwhite
forestgreen
fuchsia
gainsboro
ghostwhite
gold
goldenrod
gray
green
greenyellow
grey
honeydew
hotpink
indianred
indigo
ivory
khaki
lavender
lavenderblush
lawngreen
lemonchiffon
lightblue
lightcoral
lightcyan
lightgoldenrodyellow
lightgray
lightgreen
lightgrey
lightpink
lightsalmon
lightseagreen
lightskyblue
lightslategray
lightslategrey
lightsteelblue
lightyellow
lime
limegreen
linen
magenta
maroon
mediumaquamarine
mediumblue
mediumorchid
mediumpurple
mediumseagreen
mediumslateblue
mediumspringgreen
mediumturquoise
mediumvioletred
midnightblue
mintcream
mistyrose
moccasin
navajowhite
navy
oldlace
olive
olivedrab
orange
orangered
orchid
palegoldenrod
palegreen
paleturquoise
palevioletred
papayawhip
peachpuff
peru
pink
plum
powderblue
purple
rebeccapurple
red
rosybrown
royalblue
saddlebrown
salmon
sandybrown
seagreen
seashell
sienna
silver
skyblue
slateblue
slategray
slategrey
snow
springgreen
steelblue
tan
teal
thistle
tomato
turquoise
violet
wheat
white
whitesmoke
yellow
yellowgreen