UniPRT SDK v1.0.0.0
 
Loading...
Searching...
No Matches
_Box Class Reference

A class representing a box shape for TSPL. More...

#include <_Box.h>

Inheritance diagram for _Box:
<IBox>

Instance Methods

(instancetype) - initWithStart:end:lineThickness:
 Initializes a new instance of the _Box class with specified start and end points and line thickness.
 
(instancetype) - initWithXStart:yStart:xEnd:yEnd:lineThickness:
 Initializes a new instance of the _Box class with specified start and end coordinates and line thickness.
 
(NSString *) - description
 Returns a string that can be sent to the printer.
 

Properties

id< IRulerruler
 The ruler used to measure the box.
 
id< IPointstart
 The starting point of the box.
 
id< IPointend
 The ending point of the box.
 
float lineThickness
 The thickness of the box's lines.
 
float cornerRounding
 The corner rounding radius of the box.
 
- Properties inherited from <IBox>
id< IRulerruler
 The ruler used for placement. If not set, the default ruler setting is used.
 
id< IPointstart
 Upper left corner of the box.
 
id< IPointend
 Bottom right corner of the box.
 
float lineThickness
 Thickness of the line based on the ruler units in use.
 
float cornerRounding
 Rounding value of the box corner.
 

Detailed Description

A class representing a box shape for TSPL.

This class implements the IBox protocol and provides functionality for initializing and describing a box in TSPL.

Method Documentation

◆ description

- (NSString *) description

Returns a string that can be sent to the printer.

This method generates a string representation of the _Box instance that is formatted and ready to be sent to a printer. The string includes all the necessary commands and data required for printing in TSPL.

Returns
A string description of the _Box instance.

◆ initWithStart:end:lineThickness:

- (instancetype) initWithStart: (id< IPoint >) start
end: (id< IPoint >) end
lineThickness: (float) lineThickness 

Initializes a new instance of the _Box class with specified start and end points and line thickness.

Parameters
startThe starting point of the box.
endThe ending point of the box.
lineThicknessThe thickness of the box's lines.
Returns
A new instance of _Box.

◆ initWithXStart:yStart:xEnd:yEnd:lineThickness:

- (instancetype) initWithXStart: (float) xStart
yStart: (float) yStart
xEnd: (float) xEnd
yEnd: (float) yEnd
lineThickness: (float) lineThickness 

Initializes a new instance of the _Box class with specified start and end coordinates and line thickness.

Parameters
xStartThe x-coordinate of the starting point.
yStartThe y-coordinate of the starting point.
xEndThe x-coordinate of the ending point.
yEndThe y-coordinate of the ending point.
lineThicknessThe thickness of the box's lines.
Returns
A new instance of _Box.

Property Documentation

◆ cornerRounding

- (float) cornerRounding
readwritenonatomicassign

The corner rounding radius of the box.

◆ end

- (id<IPoint>) end
readwritenonatomicstrong

The ending point of the box.

◆ lineThickness

- (float) lineThickness
readwritenonatomicassign

The thickness of the box's lines.

◆ ruler

- (id<IRuler>) ruler
readwritenonatomicstrong

The ruler used to measure the box.

◆ start

- (id<IPoint>) start
readwritenonatomicstrong

The starting point of the box.


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