--***************************************************************************** -- (C) IpeSoft s.r.o. (Ltd.) ZILINA -- PROJECT : D2000 -- FILE : Imp_def.ads -- -- DESCRIPTION : definicia konstant a typov pre import gr.formatov -- --***************************************************************************** with system; use system;
package Imp_Def is
--*************************************************************************** -- Constants of gr.object's types --*************************************************************************** cLine : constant := 0; -- objekt ciara cPLine : constant := 1; -- objekt viacnasobna ciara cDLine : constant := 2; -- objekt viacnasobna prerusovana ciara cArc : constant := 3; -- objekt obluk c3Arc : constant := 4; -- objekt trojbodovy obluk cBox : constant := 5; -- objekt obdlznik cPAngle : constant := 6; -- objekt mnohouholnik cCircle : constant := 7; -- objekt kruh cPiArc : constant := 8; -- objekt kruhova vysec cElipse : constant := 11; -- objekt elipsa cText : constant := 12; -- objekt text cGroup : constant := 32; -- skupina objektov
-- extra types cLineCombined : constant := -1; -- skombinuje seriu ciar rovankych atributov do jedneho objektu -- typu PolyLine alebo PolyLineDisjoint cPLineAdd : constant := -2; -- pridaj seriu parametrov do vytvaraneho objektu typu polyline -- (ak nie je vytvarany, tak zaloz novy)
cFontStyle : constant := -3; -- vytvorenie textového štýlu + autovytváranie
-- počas vytvárania textov - od ver. 5.00 -- (s daným menom môže existovať len 1 štýl)
--*************************************************************************** -- konstanty definujuce povolene typy pre niektore parametre ----------------------------------------------------------------------------- -- oznacenia v komentaroch -- (*) - default parameter --***************************************************************************
--*************************************************************************** -- color definition, implicitne farby logickej palety pouzivanej pri importe --*************************************************************************** type TColorArr is ARRAY (0.. 15) OF integer; -- svetla..tmava
-- bazy farieb CLR_BASE_WHITE : constant := 0; W : constant := CLR_BASE_WHITE; CLR_BASE_YELLOW : constant := 16; Y : constant := CLR_BASE_YELLOW; CLR_BASE_CYAN : constant := 32; C : constant := CLR_BASE_CYAN; CLR_BASE_GREEN : constant := 48; G : constant := CLR_BASE_GREEN; CLR_BASE_RED : constant := 64; R : constant := CLR_BASE_RED; CLR_BASE_PINK : constant := 80; P : constant := CLR_BASE_PINK; CLR_BASE_BLUE : constant := 96; B : constant := CLR_BASE_BLUE;
-- indexy farieb CLR_WHITE : constant TColorArr := (W+0,W+1,W+2,W+3,W+4,W+5,6,W+7,W+8,W+9,W+10,W+11,W+12,W+13,W+14,W+15); CLR_YELLOW : constant TColorArr := (Y+0,Y+1,Y+2,Y+3,Y+4,Y+5,6,Y+7,Y+8,Y+9,Y+10,Y+11,Y+12,Y+13,Y+14,Y+15); CLR_CYAN : constant TColorArr := (C+0,C+1,C+2,C+3,C+4,C+5,6,C+7,C+8,C+9,C+10,C+11,C+12,C+13,C+14,C+15); CLR_GREEN : constant TColorArr := (G+0,G+1,G+2,G+3,G+4,G+5,6,G+7,G+8,G+9,G+10,G+11,G+12,G+13,G+14,G+15); CLR_RED : constant TColorArr := (W+0,W+1,W+2,W+3,W+4,W+5,6,W+7,W+8,W+9,W+10,W+11,W+12,W+13,W+14,W+15); CLR_PINK : constant TColorArr := (P+0,P+1,P+2,P+3,P+4,P+5,6,P+7,P+8,P+9,P+10,P+11,P+12,P+13,P+14,P+15); CLR_BLUE : constant TColorArr := (B+0,B+1,B+2,B+3,B+4,B+5,6,B+7,B+8,B+9,B+10,B+11,B+12,B+13,B+14,B+15);
-- niektore vybrane farby i_CLR_WHITE : constant integer := 0; i_CLR_PALEGRAYLIGHT : constant integer := 2; i_CLR_PALEGRAY : constant integer := 4; i_CLR_DARKGRAY : constant integer := 10; i_CLR_DARKGRAYDARK : constant integer := 12; i_CLR_BLACK : constant integer := 15;
i_CLR_YELLOW : constant integer := 22; i_CLR_DARKYELLOW: constant integer := 26; i_CLR_CYAN : constant integer := 38; i_CLR_DARKCYAN : constant integer := 42; i_CLR_GREEN : constant integer := 54; i_CLR_DARKGREEN : constant integer := 58; i_CLR_RED : constant integer := 70; i_CLR_DARKRED : constant integer := 74; i_CLR_PINK : constant integer := 86; i_CLR_DARKPINK : constant integer := 90; i_CLR_BLUE : constant integer :=102; i_CLR_DARKBLUE : constant integer :=106;
--*************************************************************************** -- štýl čiar -- lineStyles - type TPenStyle is (Solid, Alternate, Dash, Dot, DashDot, DashDotDot, Invisible); --*************************************************************************** tLS_Solid : constant := 0; -- ----------- (*) tLS_Alternate : constant := 1; -- . . . . . . - iba tenka, nepouzivat tLS_Dash : constant := 2; -- - - - - - - tLS_Dot : constant := 3; -- . . . . . . tLS_DashDot : constant := 4; -- - . - . - . tLS_DashDotDot : constant := 5; -- - . . - . . tLS_Invisible : constant := 6; -- nepodporena
--*************************************************************************** -- ukončenie čiar -- lineEnd - type TLineEnd is (Flat, Square, Round); --*************************************************************************** tLE_Flat : constant := 0; -- ostry roh (*) tLE_Square : constant := 1; -- skoseny roh tLE_Round : constant := 2; -- zaobleny roh
--*************************************************************************** -- zalomenie čiar -- lineJoin - type TLineJoin is (Bevel, Round, Miter); --*************************************************************************** tLJ_Bevel : constant := 0; -- ukoncenie na koncovom bode (*) tLJ_Round : constant := 1; -- zaoblene zakoncenie za koncovym bodom tLJ_Miter : constant := 2; -- hranate zakoncenie za koncovym bodom
--*************************************************************************** -- vyplnove vzory poskytovane vo Windows -- brushStyle - type TBrushStyle is (Solid, Hollow, BDiagonal, Cross, DiagCross, -- FDiagonal, Horizontal, Vertical); --*************************************************************************** tBS_Solid : constant := 0; -- plny vzor tBS_Hollow : constant := 1; -- prazdny vzor (*) tBS_BDiagonal : constant := 2; tBS_Cross : constant := 3; tBS_DiagCross : constant := 4; tBS_FDiagonal : constant := 5; tBS_CHorizontal : constant := 6; tBS_Vertical : constant := 7;
--*************************************************************************** -- umiestnenie textov -- cTextPos - type tTextPos is (tpAtPos,tpInBox,tpIntoBox); --*************************************************************************** tTP_ATPOS : constant := 0; -- text na zadanej pozicii (*) tTP_INBLOCK : constant := 1; -- text umiestneny v obdlzniku tTP_INTOBLOCK : constant := 2; -- text zaplnujuci obdlznik
--*************************************************************************** -- horizontalne umiestnenia pre text umiestneny v obdlzniku -- cTextCenterH -horizontal center --*************************************************************************** tTHC_LEFT : constant := 0; -- vlavo tTHC_MIDDLE : constant := 1; -- centrovany (*) tTHC_RIGHT : constant := 2; -- vpravo
--*************************************************************************** -- vertikalne umiestnenia pre text umiestneny v obdlzniku -- cTextCenterV - vertical center --*************************************************************************** tTVC_TOP : constant := 0; -- hore tTVC_MIDDLE : constant := 1; -- centrovany (*) tTVC_BOTTOM : constant := 2; -- dole
--*************************************************************************** -- parametre gr.objektov - param's types constants ----------------------------------------------------------------------------- -- implementacne poznamky -- 1. aby boli parametre akceptovane, musia by v procedurach takych typov ako -- su v poznamke za parametrom -- 2. nie vsetky parametre su realizovane -- 3. možno zadať max.1000 pozicnych bodov, ale V4.5 pozna max.prvych 1+30 -- pri väčšom počte bodov pre typ polyline sa generuje viacero objektov tohto typu -- 4. index farby pre import index do default farebnej palety -- 5. farba RGB od ver V5.0 farby plnia 128 prvkovu tabulku z ktorej bude vytvoreny -- objet paleta, farby v objekte budu ukladane ako indexy do tejto tabulky --***************************************************************************
----------------------------------------------------------------------------- -- positions and sizes ----------------------------------------------------------------------------- cPosXY : constant :=1; -- 2 * int/float - pozicia bodu cPosDXY : constant :=2; -- 2 * int/float - vzdialenodt bodu od predosleho bodu
----------------------------------------------------------------------------- -- line params ----------------------------------------------------------------------------- cLineColorRGB : constant :=10; -- int - RGB farba objektu - od ver V5.0 cLineColorIdx : constant :=11; -- int - index farby v lokalnej palete cLineStyle : constant :=12; -- int - styl ciary - lineStyles cLineWidth : constant :=13; -- int - hrubka ciary 1.. cLineEnd : constant :=14; -- int - zakoncenie hrubej ciary - lineEnd cLineJoin : constant :=15; -- int - zalomenie polyline ciary - lineJoin
----------------------------------------------------------------------------- -- fill params ----------------------------------------------------------------------------- cFillColorRGB : constant :=30; -- int - RGB farba objektu - od ver V5.0 cFillColorIdx : constant :=31; -- int - index farby v lokalnej palete cFillPattern : constant :=32; -- int - styl ciary - brushStyle
----------------------------------------------------------------------------- -- circles ----------------------------------------------------------------------------- cCircleRadial : constant :=50; -- int/float - polomer kruhu -- cCircleAngleDegStart : constant :=56; -- int/float - degree cCircleAngleDegEnd : constant :=57; -- int/float - degree cCircleAngleDegSize : constant :=58; -- int/float - degree -- cCircleAngleRadStart : constant :=59; -- int/float - radiant cCircleAngleRadEnd : constant :=60; -- int/float - radiant cCircleAngleRadSize : constant :=61; -- int/float - degree ----------------------------------------------------------------------------- -- text params ----------------------------------------------------------------------------- cTextText : constant :=70; -- text cTextColorRGB : constant :=71; -- int - RGB farba objektu - od ver V5.0 cTextColorIdx : constant :=72; -- int - index farby v lokalnej palete -- cTextPos : constant :=73; -- int - umiestnenie v obdlzniku, tTP_ATPOS,.. cTextCenterH : constant :=76; -- int - horizontalne centrovanie v obdlzniku cTextCenterV : constant :=77; -- int - vertikalne centrovanie v obdlzniku
--*************************************************************************** -- vytvorenie textového štýlu -- txt.štýl sa vytvori ako objekt s parametrom CFont alebo pocas vytvarania textu -- * ak nebudú nastavené všetky parametre font sa nevytvorí -- * ak štýl s menom v cFontStyleName existuje, nový nebude vytvorený, použije sa existujúci -- * ak je txt.štýl vytvorený počas vytvárania textu, bude text kreslený týmto štýlom -- * ak je počas vytvárania textu zadaný iba cFontStyleName, -- potom bude text kreslený týmto štýlom (ak existuje) --*************************************************************************** cFontStyleName : constant :=200; -- string - meno textového štýlu cFontName : constant :=201; -- string - meno fontu cFontSize : constant :=202; -- Integer - vyska fonty cFontBold : constant :=203; -- Boolean - atribut pre hruby font cFontItalic : constant :=204; -- Boolean - atribut pre sikmy font cFontUnderline : constant :=205; -- Boolean - atribut pre podtrhnuty font cFontStrikeOut : constant :=206; -- Boolean - atribut pre preciarknuty font cFontCharSet : constant :=207; -- Integer - subor znakov (Western,Central euroean)
--*************************************************************************** -- types of obj.actions --*************************************************************************** type tObjAction is (closeFigure, -- uzatvor polyline , prevod na mnohouholník closeObject, -- zatvor objekt closeGroup, -- zatvor objekt a grupu closeAll); -- zatvor objekt a všetky grupy -- vnútorne volaný po ukončení importu
--*************************************************************************** -- access to functions - definitions --***************************************************************************
type tCreateObj is access procedure (objType : integer); type tObjAtion is access procedure (action : tObjAction := closeObject);
type tset_string is access procedure (param : integer; val :string); type tset_boolean is access procedure (param : integer; val :boolean); type tset_integer is access procedure (param : integer; val :integer); type tset_float is access procedure (param : integer; val :long_float); type tset_integer2 is access procedure (param : integer; val1,val2 : integer); type tset_float2 is access procedure (param : integer; val1,val2 : long_float);
-- info text pocas importu type tShowInfo is access procedure (text : string);
--*************************************************************************** -- access to functions --*************************************************************************** createObj : tCreateObj := null; objAction : tObjAtion := null;
set_string : tset_string := null; set_boolean : tset_boolean := null; set_integer : tset_integer := null; set_float : tset_float := null; set_integer2 : tset_integer2 := null; set_float2 : tset_float2 := null;
-- info text pocas importu ShowInfo : tShowInfo := null;
--*************************************************************************** -- access to import functions --***************************************************************************
pShowInfo : constant := 0; pcreateObj : constant := 1; pobjAction : constant := 2; pset_string : constant := 3; pset_boolean : constant := 4; pset_integer : constant := 5; pset_float : constant := 6; pset_integer2 : constant := 7; pset_float2 : constant := 8;
-- pointer to 1.char of null terminating string maxResStr : constant := 10000;
-- nazov importu a tup suboru type tGetFileType is access procedure (description,extension: out address);
-- inicializacia call-back procedur type tImportConnect is access procedure (procType:integer; procAddr : address);
-- load autocad dxf file type tImportFile is access procedure (FileName:address;x,y:INTEGER;resStr:address);
end Imp_Def; --*****************************************************************************
------------------------------------------------------------------------------- -- Revisions History -- ------------------------------------------------------------------------------- -- 0.00 28.02.01 - vytvorenie modulu -------------------------------------------------------------------------------
Súvisiace stránky:
0 komentárov