[Artwork] / [QisMLib] / [Programmer's Corner]
QisMLOA ExtensionQisMLOA C++ API (qismloa.h)QisMLOAstreamVersion control (QisMLOAstream)Begin_loa_streamBegin_loa_patternAdd_loa_boundariesAdd_loa_referenceEnd_loa_patternEnd_loa_streamGet_error_msgQisMLOAsetPrm QisMLOAnnTypQisMLOAnnItmQisMLOAmergeQisMLOAsetVersion control (QisMLOAset)Get_error_msg (QisMLOAset)Get_error_tag (QisMLOAset)Get_error_context (QisMLOAset)Begin_annotation_itemAdd_item_paramAdd_item_param_strCommit_annotation_itemSet_to_streamQisMLOAVersion control (QisMLOA)Get_error_msg (QisMLOA)Get_error_tag (QisMLOA)Get_error_context (QisMLOA)Reset_set_paramsAdd_set_paramGet_set_params_strNew_annotation_setDelete_annotation_setMerge_annotations_and_dbQisMLOA Licensing (API)QisMLOA Version Historyqismloa dll v1.0 2022-06-08LOAclient Command-line (loaclient64.exe)Required GDSII/OASIS source fileOutput path (base)Optional : SourceLayers of interestView cellOutput top cell nameDrop TEXT elementsOASIS outputOptional : Add Annotation ItemsTEXT based annotationsTranslationRotationMirror (flip X)Mirror (flip Y)InvertJustificationBorderBitmap basedArtwork RAW FormatTranslationRotationMirror (flip X)Mirror (flip Y)InvertScaleOptional : For all annotation itemsFont repositoryFont scratchpadFont weightLine spacingSlantAspect ratioCircularizationFont Arc ResolutionFont Chord ErrorPixel Size FactorUnion modeSorting sizeAnnotation layerThreading ControlOptional : Progress updatesLoggingConsoleLOAclient LicensingLOAclient Version Historyloaclient exe v1.0 2022-06-08
class QisMLOAstream { ... };
V<number>
. E.g <baseclass>V<version>
xxxxxxxxxx
virtual const char* QisMLOAstream_name(const int version) const = 0;
virtual void* QisMLOAstream_cast(const int version) = 0;
virtual const void* QisMLOAstream_cast(const int version) const = 0;
virtual int QisMLOAstream_latest_version() const = 0;
units_m
is the stream units in metergrid_m
is the stream resolution in meterxxxxxxxxxx
virtual int Begin_loa_stream(const double units_m, const double grid_m) { return 0; }
name
is the name of this cellxxxxxxxxxx
virtual int Begin_loa_pattern(const char* name) { return 0; }
n
is the number of boundaries in the setnv
is an array of n
elements where each element 0 <= i < n
is the number of vertices for the corresponding boundary in the setxy
is an array of n
xy-coordinates where each element 0 <= i < n
corresponds to boundary i
. Each element is in turn an array of x,y pairs. The number of pairs is determined by nv
for i
lnum
and dnum
represents the layer assigned to this annotation. It can be set during New_annotation_set. Default is 0:0
xxxxxxxxxx
virtual int Add_loa_boundaries(
const int* const* xy, const int* nv, const int n, const unsigned short lnum,
const unsigned short dnum
) { return 0; }
TOP
cell using cell referencespattern_name
is the name of the cell being referenced in TOP
x
and y
represent the insertion point in database units (dbu)scale
, angle
and flip_y
represent the transformation parameters for this reference. angle
is in degreesxxxxxxxxxx
virtual int Add_loa_reference(
const char* pattern_name, const int x, const int y, const double scale,
const double angle, const bool flip_y
) { return 0; }
xxxxxxxxxx
virtual int End_loa_pattern() { return 0; }
xxxxxxxxxx
virtual int End_loa_stream() { return 0; }
xxxxxxxxxx
virtual const char* Get_error_msg(const int ret) const { return ""; }
xxxxxxxxxx
struct QisMLOAsetPrm { enum Code { ... }; };
ACSLIB_TTF_FONTDIR
MUST be set to such a directory. Otherwise, adding LOA_E_ANNTYP_TEXT
annotations will failconst char*
representing the directory pathxxxxxxxxxx
LOA_E_SETPRM_TTF_FNTDR=1
ACSLIB_FONTDIR
MUST be set to such a directory. Otherwise, adding LOA_E_ANNTYP_TEXT
annotations will failconst char*
representing the directory pathxxxxxxxxxx
,LOA_E_SETPRM_FNTDR
1/stroke_weight
the height of the text.double
LOA_E_ANNTYP_TEXT
tionsxxxxxxxxxx
,LOA_E_SETPRM_STRK_WGHT
LOA_E_ANNTYP_TEXT
annotationsdouble
xxxxxxxxxx
,LOA_E_SETPRM_LN_SPCNG
LOA_E_ANNTYP_TEXT
annotations double
xxxxxxxxxx
,LOA_E_SETPRM_SLNT
Option to set the x/y aspect ratio for the LOA_E_ANNTYP_TEXT
annotations
double
xxxxxxxxxx
,LOA_E_SETPRM_ASPCT
LOA_E_SETPRM_ARCRES
and LOA_E_SETPRM_CHRDERR
int
-- 1 (on) or 0 (off)xxxxxxxxxx
,LOA_E_SETPRM_CRCLR
LOA_E_SETPRM_CHRDERR
double
xxxxxxxxxx
,LOA_E_SETPRM_ARCRES
double
-- font arc recovery and font chord errorxxxxxxxxxx
,LOA_E_SETPRM_CHRDERR
double
xxxxxxxxxx
,LOA_E_SETPRM_PXLSZ_FCTR
LOA_E_ANNTYP_BUFR
) will have the image buffer persist during the execution or notint
-- 1 or 0xxxxxxxxxx
,LOA_E_SETPRM_BUF_PRST
xxxxxxxxxx
//off | butting | (cutline | on)
,LOA_E_SETPRM_UNION
int
100,000
. Sort or re-sort every 100,000 entriesxxxxxxxxxx
,LOA_E_SETPRM_SRT_SZ
int
-- 0 <= lnum < 65536
and 0 <= dnum < 65536
xxxxxxxxxx
,LOA_E_SETPRM_OUT_LYR
xxxxxxxxxx
,LOA_E_SETPRM_THRNUM
xxxxxxxxxx
struct QisMLOAnnTyp { enum Code { ... }; };
const char*
representing the file pathxxxxxxxxxx
LOA_E_ANNTYP_FILE=1
const char*
- text string, font name followed by one double
- font height (user units) (>0.0)LOA_E_SETPRM_TTF_FNTDR
or the env. variable ACSLIB_TTF_FONTDIR
LOA_E_SETPRM_FNTDR
or the environment variable ACSLIB_FONTDIR
MUST be set to a writable directory where intermediate font files will be created\\
(backslash) and r
xxxxxxxxxx
,LOA_E_ANNTYP_TEXT
unsigned char*
representing the buffer pointer, two int
representing width and height in pixelsLOA_E_SETPRM_BUF_PRST
setting applied during the creation of the set, either the image will be copied (default) or the buffer will be expected to persist until the destruction of the setxxxxxxxxxx
,LOA_E_ANNTYP_BUFR
xxxxxxxxxx
struct QisMLOAnnItm { enum Code { ... }; };
double
representing x and y offsets respectively in user unitsxxxxxxxxxx
LOA_E_ANNITM_TXY=1
double
representing the angle (degrees), x and y anchor point in user unitsxxxxxxxxxx
,LOA_E_ANNITM_ANGLE
Option to mirror the annotation about the Y axis (along X)
double
representing the anchor pointxxxxxxxxxx
,LOA_E_ANNITM_MIRROR_X
Option to mirror the annotation about the X axis (along Y)
double
representing the anchor pointxxxxxxxxxx
,LOA_E_ANNITM_MIRROR_Y
int
1 (on) or 0 (off)xxxxxxxxxx
,LOA_E_ANNITM_INVERT
double
representing the scaling (>0.0)xxxxxxxxxx
,LOA_E_ANNITMFILE_SCALE
Option to justify a text annotation (type LOA_S_ANNTYP_TEXT)
MUST be followed by two int
representing the justification as follows
int
represents horizontal justificationint
represents vertical justificationHorizontal justification : 0 (left) or 1 (center) or 2 (right)
Vertical justification : 0 (top) or 1 (middle) or 2 (bottom) or 3 (baseline of the first line)
Default : 0,0 (left, top)
xxxxxxxxxx
,LOA_E_ANNITMTEXT_JSTFY
Option to add border to a text annotation (type LOA_S_ANNTYP_TEXT)
double
representing the margin and frame thickness in user unitsxxxxxxxxxx
,LOA_E_ANNITMTEXT_BORDER
xxxxxxxxxx
struct QisMLOAmerge { enum Code { ... }; };
const char*
representing the cell nameQisMFile::Get_default_top_cell()
xxxxxxxxxx
//string format
LOA_E_MERGE_VCELL=1 //enum code
const char*
representing the layer string"1,2:2,3,4:4,4:8"
"ALL"
xxxxxxxxxx
//string format
,LOA_E_MERGE_LYRS //enum code
const char*
representing the cell namexxxxxxxxxx
//string format
,LOA_E_MERGE_TOP //enum code
LOA_E_MERGE_GDS
or "gdsii"
xxxxxxxxxx
//string format
,LOA_E_MERGE_OAS //enum code
LOA_E_MERGE_GDS
or "gdsii"
xxxxxxxxxx
//string format
,LOA_E_MERGE_GDS //enum code
xxxxxxxxxx
class QisMLOAset { ... };
V<number>
. E.g <baseclass>V<version>
xxxxxxxxxx
virtual const char* QisMLOAset_name(const int version) const = 0;
virtual void* QisMLOAset_cast(const int version) = 0;
virtual const void* QisMLOAset_cast(const int version) const = 0;
virtual int QisMLOAset_latest_version() const = 0;
code
returned by the corresponding operationxxxxxxxxxx
virtual const char* Get_error_msg(const int code) const = 0;
virtual const char* Get_error_tag(const int code) const = 0;
virtual const char* Get_error_context(const int code) const = 0;
anntyp_code
is an integer code that represents the type of annotation using one of the QisMLOAnnTyp enums....
represents the additional arguments required to define this type. The number, types and order of these arguments are described next to the corresponding enumGet_error...
for detailsxxxxxxxxxx
virtual int Begin_annotation_item(const int anntyp_code, ...) = 0;
anntyp_code
is an integer code that represents the parameter to be added using one of the QisMLOAnnItm enums....
represents the additional values for this parameter. The number, types and order of these values are described next to the corresponding enumparams
. The individual parameters are separated by spaces and those with spaces in them are bounded by "
double quotesGet_error...
for detailsxxxxxxxxxx
virtual int Add_item_param(const int annitm_code, ...) = 0;
virtual int Add_item_param_str(const char* params) = 0;
Get_error...
for detailsxxxxxxxxxx
virtual int Commit_annotation_item() = 0;
Receive all annotations from the set as a GDSII-like stream
flat
set the stream mode.
true
implies no hierarchy. i.e there is only one cell TOP
that contains all the boundaries representing all the annotations.false
implies hierarchical. i.e, annotations have their own cell definitions. they are aggregated (referenced) in the TOP
cellclient
is a handle to the stream handler
opts
is reserved for future use
Returns 0 on success. Otherwise use Get_error...
for details
xxxxxxxxxx
virtual int Set_to_stream(
const bool flat, QisMLOAstream* client, const char* opts
) = 0;
xxxxxxxxxx
class QisMLOA: public NsQisMLib::QisMExtensionAPI { ... };
V<number>
. E.g <baseclass>V<version>
xxxxxxxxxx
virtual const char* QisMLOA_name(const int version) const = 0;
virtual void* QisMLOA_cast(const int version) = 0;
virtual const void* QisMLOA_cast(const int version) const = 0;
virtual int QisMLOA_latest_version() const = 0;
code
returned by the corresponding operationxxxxxxxxxx
virtual const char* Get_error_msg(const int code) const = 0;
virtual const char* Get_error_tag(const int code) const = 0;
virtual const char* Get_error_context(const int code) const = 0;
xxxxxxxxxx
virtual void Reset_set_params() = 0;
setprm_code
is an integer code that represents the parameter to be added using one of QisMLOAsetPrm enums....
represents the additional values for this parameter. The number, types and order of these values are described next to the corresponding enumsetprm_code
is recognized and acceptedxxxxxxxxxx
virtual bool Add_set_param(const int setprm_code, ...) = 0;
xxxxxxxxxx
virtual const char* Get_set_params_str() const = 0;
units_m
and grid_m
represents the units and resolution for the set in meterloa_setprm_str
is a string of parameters separated by spacesecode
is address to store the error code (on failure)New_annotation_set
Delete_annotation_set
ecode
and Get_error...
for detailsxxxxxxxxxx
virtual QisMLOAset* New_annotation_set(
const double units_m, const double grid_m, const char* loa_setprm_str,
int* ecode
) = 0;
virtual void Delete_annotation_set(QisMLOAset* handle) = 0;
filedb
is a handle to a valid QisMLib DB. Cannot be NULL or emptyannotations
is a handle to the set of annotations to be added (can be NULL or empty)output_base
is the path (dir + name) of the output file. extension (.gds or .oas) will be automatically added based on the formatmerge_opts
is a string of parameters separated by spaces. See QisMLOAmerge for a list of parameters and their syntaxGet_error...
for detailsxxxxxxxxxx
virtual int Merge_annotations_and_db(
NsQisMLib::QisMFile* filedb, QisMLOAset* annotations,
const char* output_base, const char* merge_opts
) = 0;
xxxxxxxxxx
loaclient +{REQUIRED} [-{OPTIONS}]
xxxxxxxxxx
+input:{input_gds_oas_path}
xxxxxxxxxx
+out:{output_dir+filename}
xxxxxxxxxx
[-layers:{layer_str}]
1,2:2,3,4:4,4:8
extracts all data types of 1 and 3, only 2:2 for layer 2 and 4:4 and 4:8 for layer 4"ALL"
(all layers from the source)xxxxxxxxxx
[-viewcell:{source_cell_name}]
xxxxxxxxxx
[-topcell:{output_top_cell_name}]
xxxxxxxxxx
[-notext]
xxxxxxxxxx
[-oasis]
xxxxxxxxxx
{ -add:TEXT,{text_str},{font_name},{font_height} ... }*
Add one or more annotations based on a text-string
{text_str}
represents the annotation string
<space>
(if the argument is fully enclosed in double-quotes)<new-line>
represented by two characters -- <comma>
{font_name}
is the name of the font file to be used to render this annotation
ACSLIB_TTF_FONTDIR
env. variable{font_height}
represents the height of the annotation text in user units
This annotation item can be flavored further by specifying more options
xxxxxxxxxx
[-translate:{x},{y}]
{x},{y}
in user units in the design (top cell) spacexxxxxxxxxx
[-angle:{deg},{x},{y}]
{x},{y}
by {deg}
degress in the design (top cell) spacexxxxxxxxxx
[-mirror:x,{anchor_pt}]
{anchor_pt}
(x) valuexxxxxxxxxx
[-mirror:y,{anchor_pt}]
{anchor_pt}
(y) valuexxxxxxxxxx
[-invert]
xxxxxxxxxx
[-justify:{horizontal 0-2},{vertical 0-3}]
xxxxxxxxxx
[-border:{margin},{frame}]
{frame}
is the thickness of the frame in user unitsxxxxxxxxxx
{ -add:FILE,{file_path} ... }*
xxxxxxxxxx
'L''G''R''A''W''0''0'<width-in-pixels><height-in-pixels><image-bytes-size><image-bytes>
<width-in-pixels>
: 4 bytes <height-in-pixels>
: 4 bytes<image-bytes-size>
: 8 bytes<image-bytes>
: <image-bytes-size>
bytesxxxxxxxxxx
[-translate:{x},{y}]
{x},{y}
in user units in the design (top cell) spacexxxxxxxxxx
[-angle:{deg},{x},{y}]
{x},{y}
by {deg}
degress in the design (top cell) spacexxxxxxxxxx
[-mirror:x,{anchor_pt}]
{anchor_pt}
(x) valuexxxxxxxxxx
[-mirror:y,{anchor_pt}]
{anchor_pt}
(y) valuexxxxxxxxxx
[-invert]
xxxxxxxxxx
[-scale:{value}]
xxxxxxxxxx
[-ttf_dir:{ttf_font_dir}]
ACSLIB_TTF_FONTDIR
MUST be set to such a directory. Otherwise, adding text annotations will failxxxxxxxxxx
[-font_dir:{font_dir}]
ACSLIB_FONTDIR
MUST be set to such a directory. Otherwise, adding text annotations will failxxxxxxxxxx
[-stroke_weight:{value}]
1/stroke_weight
the height of the text.xxxxxxxxxx
[-line_spacing:{value}]
LOA_E_ANNTYP_TEXT
annotationsxxxxxxxxxx
[-slant:{value}]
xxxxxxxxxx
[-aspect:{ratio}]
xxxxxxxxxx
[-circularize]
xxxxxxxxxx
[-arcres:{degrees}]
LOA_E_SETPRM_CHRDERR
double
xxxxxxxxxx
[-chord_error:{font_arc_recov},{font_chord_err}]
xxxxxxxxxx
[-px_size_factor:{value}]
xxxxxxxxxx
[-union:off | butting | cutline | on]
xxxxxxxxxx
[-sort_sz:{value}]
100,000
. Sort or re-sort every 100,000 entriesxxxxxxxxxx
[-ann_lyr:{lnum}:{dnum}]
xxxxxxxxxx
[-thrnum:{n}]
xxxxxxxxxx
[-log:{file_path} | -log+:{file_path}]
{file_path}
-log:
creates a new file while -log+:
appends to an existing filexxxxxxxxxx
[-silent]