[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>xxxxxxxxxxvirtual 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 meterxxxxxxxxxxvirtual int Begin_loa_stream(const double units_m, const double grid_m) { return 0; }name is the name of this cellxxxxxxxxxxvirtual 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 ilnum and dnum represents the layer assigned to this annotation. It can be set during New_annotation_set. Default is 0:0xxxxxxxxxxvirtual 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 TOPx 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 degreesxxxxxxxxxxvirtual 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; }xxxxxxxxxxvirtual int End_loa_pattern() { return 0; }xxxxxxxxxxvirtual int End_loa_stream() { return 0; }xxxxxxxxxxvirtual const char* Get_error_msg(const int ret) const { return ""; }xxxxxxxxxxstruct 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 pathxxxxxxxxxxLOA_E_SETPRM_TTF_FNTDR=1ACSLIB_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_FNTDR1/stroke_weight the height of the text.doubleLOA_E_ANNTYP_TEXTtionsxxxxxxxxxx,LOA_E_SETPRM_STRK_WGHTLOA_E_ANNTYP_TEXT annotationsdoublexxxxxxxxxx,LOA_E_SETPRM_LN_SPCNGLOA_E_ANNTYP_TEXT annotations doublexxxxxxxxxx,LOA_E_SETPRM_SLNTOption to set the x/y aspect ratio for the LOA_E_ANNTYP_TEXT annotations
doublexxxxxxxxxx,LOA_E_SETPRM_ASPCTLOA_E_SETPRM_ARCRES and LOA_E_SETPRM_CHRDERRint -- 1 (on) or 0 (off)xxxxxxxxxx,LOA_E_SETPRM_CRCLRLOA_E_SETPRM_CHRDERRdoublexxxxxxxxxx,LOA_E_SETPRM_ARCRESdouble -- font arc recovery and font chord errorxxxxxxxxxx,LOA_E_SETPRM_CHRDERRdoublexxxxxxxxxx,LOA_E_SETPRM_PXLSZ_FCTRLOA_E_ANNTYP_BUFR) will have the image buffer persist during the execution or notint -- 1 or 0xxxxxxxxxx,LOA_E_SETPRM_BUF_PRSTxxxxxxxxxx//off | butting | (cutline | on),LOA_E_SETPRM_UNIONint100,000. Sort or re-sort every 100,000 entriesxxxxxxxxxx,LOA_E_SETPRM_SRT_SZint -- 0 <= lnum < 65536 and 0 <= dnum < 65536xxxxxxxxxx,LOA_E_SETPRM_OUT_LYRxxxxxxxxxx,LOA_E_SETPRM_THRNUMxxxxxxxxxxstruct QisMLOAnnTyp { enum Code { ... }; };const char* representing the file pathxxxxxxxxxxLOA_E_ANNTYP_FILE=1const 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_FONTDIRLOA_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 rxxxxxxxxxx,LOA_E_ANNTYP_TEXTunsigned 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_BUFRxxxxxxxxxxstruct QisMLOAnnItm { enum Code { ... }; };double representing x and y offsets respectively in user unitsxxxxxxxxxxLOA_E_ANNITM_TXY=1double representing the angle (degrees), x and y anchor point in user unitsxxxxxxxxxx,LOA_E_ANNITM_ANGLEOption to mirror the annotation about the Y axis (along X)
double representing the anchor pointxxxxxxxxxx,LOA_E_ANNITM_MIRROR_XOption to mirror the annotation about the X axis (along Y)
double representing the anchor pointxxxxxxxxxx,LOA_E_ANNITM_MIRROR_Yint 1 (on) or 0 (off)xxxxxxxxxx,LOA_E_ANNITM_INVERTdouble representing the scaling (>0.0)xxxxxxxxxx,LOA_E_ANNITMFILE_SCALEOption 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_JSTFYOption 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_BORDERxxxxxxxxxxstruct QisMLOAmerge { enum Code { ... }; };const char* representing the cell nameQisMFile::Get_default_top_cell()xxxxxxxxxx//string formatLOA_E_MERGE_VCELL=1 //enum codeconst char* representing the layer string"1,2:2,3,4:4,4:8""ALL"xxxxxxxxxx//string format,LOA_E_MERGE_LYRS //enum codeconst char* representing the cell namexxxxxxxxxx//string format,LOA_E_MERGE_TOP //enum codeLOA_E_MERGE_GDS or "gdsii"xxxxxxxxxx//string format,LOA_E_MERGE_OAS //enum codeLOA_E_MERGE_GDS or "gdsii"xxxxxxxxxx//string format,LOA_E_MERGE_GDS //enum codexxxxxxxxxxclass QisMLOAset { ... };V<number>. E.g <baseclass>V<version>xxxxxxxxxxvirtual 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 operationxxxxxxxxxxvirtual 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 detailsxxxxxxxxxxvirtual 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 detailsxxxxxxxxxxvirtual int Add_item_param(const int annitm_code, ...) = 0;virtual int Add_item_param_str(const char* params) = 0;Get_error... for detailsxxxxxxxxxxvirtual 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
xxxxxxxxxxvirtual int Set_to_stream( const bool flat, QisMLOAstream* client, const char* opts ) = 0;xxxxxxxxxxclass QisMLOA: public NsQisMLib::QisMExtensionAPI { ... };V<number>. E.g <baseclass>V<version>xxxxxxxxxxvirtual 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 operationxxxxxxxxxxvirtual 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;xxxxxxxxxxvirtual 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 acceptedxxxxxxxxxxvirtual bool Add_set_param(const int setprm_code, ...) = 0;xxxxxxxxxxvirtual 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_setDelete_annotation_setecode and Get_error... for detailsxxxxxxxxxxvirtual 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 detailsxxxxxxxxxxvirtual int Merge_annotations_and_db( NsQisMLib::QisMFile* filedb, QisMLOAset* annotations, const char* output_base, const char* merge_opts ) = 0;xxxxxxxxxxloaclient +{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_CHRDERRdoublexxxxxxxxxx[-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]