Skip to content

Commit

Permalink
Исправление для #112
Browse files Browse the repository at this point in the history
  • Loading branch information
Alligator-1 committed Mar 21, 2024
1 parent aaf3e6b commit 8fd5bf4
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions cad_source/zengine/zgl/drawers/uzglviewareageneral.pas
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ procedure TGeneralViewArea.showcursor(var DC:TDrawContext);
*)
//glColor3ub(255, 255, 255);
dc.drawer.startrender(TRM_WindowSpace,dc.DrawingContext.matrixs);
dc.drawer.SetColor(palette[ForeGroundColorIndex].RGB);
//dc.drawer.SetColor(palette[ForeGroundColorIndex].RGB);
//oglsm.glColor3ubv(foreground);

if param.seldesc.MouseFrameON then
Expand All @@ -439,18 +439,14 @@ procedure TGeneralViewArea.showcursor(var DC:TDrawContext);
dc.drawer.DrawLine2DInDCS(param.seldesc.Frame1.x,param.seldesc.Frame2.y,
param.seldesc.Frame2.x,param.seldesc.Frame1.y);

if param.seldesc.MouseFrameInverse then
dc.drawer.SetPenStyle(TPS_Solid);
if param.seldesc.MouseFrameInverse then
begin
dc.drawer.SetDrawMode(TDM_XOR);
dc.drawer.SetPenStyle(TPS_Dash);
end;
if param.seldesc.MouseFrameInverse then
dc.drawer.SetColor(0,40,0,10)
end
else
dc.drawer.SetColor(0,0,40,10);
dc.drawer.SetDrawMode(TDM_XOR);
dc.drawer.SetDrawMode(TDM_OR);
dc.drawer.DrawQuad2DInDCS(param.seldesc.Frame1.x,param.seldesc.Frame1.y,param.seldesc.Frame2.x,param.seldesc.Frame2.y);
if param.seldesc.MouseFrameInverse then
dc.drawer.SetPenStyle(TPS_Solid);
Expand Down Expand Up @@ -671,17 +667,14 @@ function TGeneralViewArea.treerender;
var
currtime:TDateTime;
Hour,Minute,Second,MilliSecond:word;
q1,q2:Boolean;
begin
if (sysvarRDMaxRenderTime<>0) then begin
currtime:=now;
decodetime(currtime-StartTime,Hour,Minute,Second,MilliSecond);
if (sysvarRDMaxRenderTime<>0) then
if (sysvarRDMaxRenderTime-MilliSecond)<0 then
exit(true);
if (sysvarRDMaxRenderTime-MilliSecond)<0 then
exit(true);
end;
q1:=false;
q2:=false;
Result:=false;

if Node.NodeData.infrustum=PDWG.Getpcamera.POSCOUNT then begin
if (Node.NodeData.FulDraw=TDTFulDraw)or(Node.nul.count=0) then begin
Expand All @@ -690,14 +683,14 @@ function TGeneralViewArea.treerender;
if not treerender(PTEntTreeNode(node.pminusnode)^,StartTime,dc) then
node.NodeData.minusdrawpos:=PDWG.Getpcamera.DRAWCOUNT
else
q1:=true;
Result:=true;
end;
if assigned(node.pplusnode)then
if node.NodeData.plusdrawpos<>PDWG.Getpcamera.DRAWCOUNT then begin
if not treerender(PTEntTreeNode(node.pplusnode)^,StartTime,dc) then
node.NodeData.plusdrawpos:=PDWG.Getpcamera.DRAWCOUNT
else
q2:=true;
Result:=true;
end;
end;
if node.NodeData.nuldrawpos<>PDWG.Getpcamera.DRAWCOUNT then begin
Expand All @@ -706,7 +699,6 @@ function TGeneralViewArea.treerender;
node.NodeData.nuldrawpos:=PDWG.Getpcamera.DRAWCOUNT;
end;
end;
result:=q1 or q2;
end;
procedure TGeneralViewArea.render;
begin
Expand Down

0 comments on commit 8fd5bf4

Please sign in to comment.