1 {
2 *****************************************************************************
3 *                                                                           *
4 *  This file is part of the ZCAD                                            *
5 *                                                                           *
6 *  See the file COPYING.modifiedLGPL.txt, included in this distribution,    *
7 *  for details about the copyright.                                         *
8 *                                                                           *
9 *  This program is distributed in the hope that it will be useful,          *
10 *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
11 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     *
12 *                                                                           *
13 *****************************************************************************
14 }
15 {
16 @author(Andrey Zubarev <zamtmn@yandex.ru>)
17 }
18 unit uzgldrawcontext;
19 {$INCLUDE def.inc}
20 interface
21 uses uzepalette,uzbtypesbase,uzbtypes,uzgldrawerabstract,uzeconsts,uzegeometry;
22 type
23 TDrawHeplGeometry=procedure  of object;
24 TDrawingContext=packed record
25                    VisibleActualy:TActulity;
26                    InfrustumActualy:TActulity;
27                    DRAWCOUNT:TActulity;
28                    SysLayer:GDBPointer;
29                    Zoom:GDBDouble;
30                    matrixs:tmatrixs;
31                    pcamera:PGDBBaseCamera;
32                    GlobalLTScale:GDBDouble;
33                    DrawHeplGeometryProc:TDrawHeplGeometry;
34                    ForeGroundColorIndex:GDBInteger;
35 end;
36 TDrawContext=packed record
37                    DrawingContext:TDrawingContext;
38                    Subrender:GDBInteger;
39                    Selected:GDBBoolean;
40                    MaxDetail:GDBBoolean;
41                    DrawMode:GDBBoolean;
42                    LWDisplayScale:GDBInteger{=2};
43                    DefaultLW:GDBInteger{=25};
44                    OwnerLineWeight:GDBSmallInt;
45                    OwnerColor:GDBInteger;
46                    MaxWidth:GDBInteger;
47                    ScrollMode:GDBBoolean;
48                    drawer:TZGLAbstractDrawer;
49                    SystmGeometryDraw:boolean;
50                    SystmGeometryColor:TGDBPaletteColor;
51              end;
CreateAbstractRCnull52 function CreateAbstractRC:TDrawContext;
53 implementation
CreateAbstractRCnull54 function CreateAbstractRC:TDrawContext;
55 begin
56       result.Subrender:=0;
57       result.Selected:=false;
58       result.DrawingContext.VisibleActualy:=0;
59       result.DrawingContext.InfrustumActualy:=0;
60       result.DrawingContext.DRAWCOUNT:=0;
61       result.DrawingContext.SysLayer:=nil;
62       result.MaxDetail:=true;
63       result.DrawMode:=true;
64       result.LWDisplayScale:=2;
65       result.DefaultLW:=25;
66       result.OwnerLineWeight:=-3;
67       result.OwnerColor:=ClWhite;
68       result.MaxWidth:=20;
69       result.ScrollMode:=false;
70       result.DrawingContext.Zoom:=1;
71       result.drawer:=nil;
72       result.DrawingContext.matrixs.pmodelMatrix:=@OneMatrix;
73       result.DrawingContext.matrixs.pprojMatrix:=@OneMatrix;
74       result.DrawingContext.matrixs.pviewport:=@DefaultVP;
75       result.DrawingContext.pcamera:=nil;
76       result.SystmGeometryDraw:=false;
77       result.SystmGeometryColor:=1;
78       result.DrawingContext.GlobalLTScale:=1;
79       result.DrawingContext.ForeGroundColorIndex:=ClWhite;
80 end;
81 begin
82 end.
83 
84