ImageGear .NET v24.12 - Updated
HPGL
User Guide > File Formats and Compressions > File Formats > File Formats Reference > HPGL
Full Name Hewlett Packard Graphics Language
Format ID ImGearFormats.HPGL
File Extension(s) *.hpgl
Data Type Vector image
Data Encoding Binary
Multi-Page Support Yes
Alpha Channel Support No
Metadata Update Support No
ImageGear Platforms Support Win32, Win64, .NET, .NET64
HPGL format requires ImageGear.Formats.HPGL Namespace.

ImageGear Supported Versions

HPGL, HPGL/2

ImageGear Supported Features

ImageGear Read Support

ImGearCompressions.NONE - Vector/CAD data

ImageGear Write Support

No

ImageGear Filter Control Parameters

Filter Control Parameter Type Default Value Available Values Description
BackColor Long 0 Any positive value This parameter is used to set background color. If nBackGroundColor=0, then a black background color is set, otherwise a white background color is set.
Width Long 512 Any positive value Defines the DIB width of the loaded image. The DIB height is calculated using the file's scale factors.

Comments

HPGL ("Hewlett Packard Graphics Language") is a vector graphics language used to output vector/CAD drawings to plotters. Due to widespread support among CAD software, it is sometimes used as a vector/CAD interchange format.

HPGL Features Supported for Reading

HPGL Instruction

Supported Attributes

Imported into ImageGear as:

BR (Bezier relative)

Relative points

ImGearVectEntities.NURBS_CURVE entity.

BZ (Bezier absolute)

Absolute points

ImGearVectEntities.BEZIER_CURVE entity.

DF (Default)

 

Used internally. Resets the settings to their default values.

DI (Absolute direction)

X coordinate of arc tangent

Y coordinate of arc tangent

Defines a direction for ImGearVectEntities.TEXT entity.

DR (Relative direction)

X coordinate of arc tangent

Y coordinate of arc tangent

Defines a direction for ImGearVectEntities.TEXT entity.

DT (Define terminator)

Terminator

Used internally. Defines a terminator for text.

EA (Rectangle absolute)

Second corner of the rectangle

ImGearVectEntities.POLYLINE entity.

EP (Edge polygon)

 

Appends ImGearVectAttrib.LINETYPEINDEX, ImGearVectAttrib.DRAWCOLOR, and ImGearVectAttrib.THICKNESS attributes to the extended polyline being previously created from PM instruction.

ER (Rectangle relative)

Second corner of the rectangle

ImGearVectEntities.POLYLINE entity.

FT (fill type)

Fill pattern

Fill spacing

Fill angle

Used for creating ImGearVectorFilltype object.

FP (Fill type polygon)

 

Appends ImGearVectAttrib.FILLTYPEINDEX and ImGearVectAttrib.FILLCOLOR attributes to the extended polyline being previously created from PM instruction.

IN (Initialize)

 

Used internally. Initializes the drawing parameters.

IP (Input P1 and P2)

Minimum point

Maximum point

Used internally for specifying layout, scale factors, and so on.

SC (Scale)

Minimum scale point

Maximum scale point

Scale mode

Used internally for specifying layout, scale factors, and so on.

SI (Absolute character size)

Width

Height

Defines font width and height for ImGearVectEntities.TEXT entities.

SR (Relative character size)

Relative width

Relative height

Defines font width and height for ImGearVectEntities.TEXT entities.

SL (Character slant)

Slant

Defines character slant for ImGearVectEntities.TEXT entities.

LB (Label)

Text string

ImGearVectEntities.TEXT entity.

\x1b. (Esc sequence)

 

Used internally.

PA (Plot absolute)

Absolute position

Defines a position of entities.

If pen is down, then either new ImGearVectEntities.POLYLINE entity or new region for ImGearVectEntities.POLYLINEEX is created.

PC (Palette entry)

Entry number

Red, Green, Blue color values

Used internally for specifying colors.

PR (Plot relative)

Relative position

Defines a position of entities.

If pen is down, then either new ImGearVectEntities.POLYLINE entity or new region for ImGearVectEntities.POLYLINEEX is created.

RA (Shade rectangle absolute)

Second corner

ImGearVectEntities.POLYLINE entity.

RR (Fill rectangle absolute)

Second corner

ImGearVectEntities.POLYLINE entity.

AA (Arc absolute)

Center

Angle (Starting from the current position)

Vertexes with bulge attribute being set if the arc is added to the polygon, otherwise - ImGearVectEntities.ARC entity.

PG (New page)

 

Used for navigation through the pages.

AF (New plot)

 

Used for navigation through the pages.

AR (Arc relative)

Offset of the center

Angle

ImGearVectEntities.ARC entity.

AT (Arc absolute three points)

Second point

Third point

ImGearVectEntities.ARC entity.

CI (Circle)

Radius

ImGearVectEntities.ELLIPSE entity.

CP (Character plot)

Spaces

Lines

Used for updating current position for ImGearVectEntities.TEXT entity.

EW (Edge wedge)

Radius

Start angle

Sweep angle

ImGearVectEntities.ARC entity.

LT (Line type)

Line style

Line pattern length

Used for creating ImGearVectorLinetype objects.

PD (Pen down)

X position

Y position

Either ImGearVectEntities.POLYLINE entity or new region for the existing ImGearVectEntities.POLYLINEEX entity.

PE (Polyline encoding)

Binary sequence

ImGearVectEntities.POLYLINE entity.

PM (Polygon mode)

Mode (new polygon or close)

ImGearVectEntities.POLYLINEEX entity.

PU (Pen up)

X position

Y position

Changes current position. For polygons, appends hidden vertices to the vertex container.

PW (Pen width)

Thickness

Defines line thickness when creating ImGearVectAttrib.THICKNESS attribute.

RO (rotate coordinate system)

Angle

Creates new ImGearVectEntities.BLOCK entity with the corresponding rotation.

SP (Select pen)

Pen number

Selects drawing color. Used as ImGearVectAttrib.DRAWCOLOR attribute.

TL (tick length)

Length positive

Length negative

Used for creating coordinate axes – see below.

WG (Shade wedge)

Radius

Start angle

Sweep angle

 

ImGearVectEntities.ARC entity.

WU (Pen width units)

Unit type (Plot units or mm)

Used for creating ImGearVectAttrib.THICKNESS attribute.

XT (X Tick, that is, X axe)

 

ImGearVectEntities.EASYLINE entity.

YT (Y Tick, that is, Y axe)

 

ImGearVectEntities.EASYLINE entity.