|
@@ -95,8 +95,6 @@ type
|
|
|
|
|
|
TRectShape = class(TCustomRectShape)
|
|
TRectShape = class(TCustomRectShape)
|
|
protected
|
|
protected
|
|
- function PenVisible(AAssumePenFill: boolean = false): boolean;
|
|
|
|
- function BackVisible: boolean;
|
|
|
|
function GetCornerPositition: single; override;
|
|
function GetCornerPositition: single; override;
|
|
public
|
|
public
|
|
class function Fields: TVectorShapeFields; override;
|
|
class function Fields: TVectorShapeFields; override;
|
|
@@ -114,8 +112,6 @@ type
|
|
|
|
|
|
TEllipseShape = class(TCustomRectShape)
|
|
TEllipseShape = class(TCustomRectShape)
|
|
protected
|
|
protected
|
|
- function PenVisible(AAssumePenFill: boolean = false): boolean;
|
|
|
|
- function BackVisible: boolean;
|
|
|
|
function GetCornerPositition: single; override;
|
|
function GetCornerPositition: single; override;
|
|
public
|
|
public
|
|
constructor Create(AContainer: TVectorOriginal); override;
|
|
constructor Create(AContainer: TVectorOriginal); override;
|
|
@@ -174,7 +170,6 @@ type
|
|
procedure SetLightPosition(AValue: TPointF);
|
|
procedure SetLightPosition(AValue: TPointF);
|
|
procedure SetShapeAltitudePercent(AValue: single);
|
|
procedure SetShapeAltitudePercent(AValue: single);
|
|
procedure SetShapeKind(AValue: TPhongShapeKind);
|
|
procedure SetShapeKind(AValue: TPhongShapeKind);
|
|
- function BackVisible: boolean;
|
|
|
|
function GetEnvelope: ArrayOfTPointF;
|
|
function GetEnvelope: ArrayOfTPointF;
|
|
public
|
|
public
|
|
constructor Create(AContainer: TVectorOriginal); override;
|
|
constructor Create(AContainer: TVectorOriginal); override;
|
|
@@ -892,16 +887,6 @@ end;
|
|
|
|
|
|
{ TRectShape }
|
|
{ TRectShape }
|
|
|
|
|
|
-function TRectShape.PenVisible(AAssumePenFill: boolean): boolean;
|
|
|
|
-begin
|
|
|
|
- result := (PenWidth>0) and not IsClearPenStyle(PenStyle) and (not PenFill.IsFullyTransparent or AAssumePenFill);
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
-function TRectShape.BackVisible: boolean;
|
|
|
|
-begin
|
|
|
|
- result := not BackFill.IsFullyTransparent;
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
function TRectShape.GetCornerPositition: single;
|
|
function TRectShape.GetCornerPositition: single;
|
|
begin
|
|
begin
|
|
result := 1;
|
|
result := 1;
|
|
@@ -912,24 +897,24 @@ var
|
|
ab: TAffineBox;
|
|
ab: TAffineBox;
|
|
backSurface, totalSurface, penSurface: Single;
|
|
backSurface, totalSurface, penSurface: Single;
|
|
begin
|
|
begin
|
|
- if not PenVisible and not BackVisible then
|
|
|
|
|
|
+ if not GetPenVisible and not GetBackVisible then
|
|
result := false
|
|
result := false
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
ab := GetAffineBox(AMatrix, true);
|
|
ab := GetAffineBox(AMatrix, true);
|
|
backSurface := ab.Surface;
|
|
backSurface := ab.Surface;
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
penSurface := (ab.Width+ab.Height)*2*PenWidth;
|
|
penSurface := (ab.Width+ab.Height)*2*PenWidth;
|
|
- if BackVisible then
|
|
|
|
|
|
+ if GetBackVisible then
|
|
totalSurface:= backSurface+penSurface/2
|
|
totalSurface:= backSurface+penSurface/2
|
|
else
|
|
else
|
|
totalSurface := penSurface;
|
|
totalSurface := penSurface;
|
|
end else
|
|
end else
|
|
totalSurface := backSurface;
|
|
totalSurface := backSurface;
|
|
result := (totalSurface > 800*600) or
|
|
result := (totalSurface > 800*600) or
|
|
- ((backSurface > 320*240) and BackVisible and BackFill.IsSlow(AMatrix)) or
|
|
|
|
- ((penSurface > 320*240) and PenVisible and PenFill.IsSlow(AMatrix));
|
|
|
|
|
|
+ ((backSurface > 320*240) and GetBackVisible and BackFill.IsSlow(AMatrix)) or
|
|
|
|
+ ((penSurface > 320*240) and GetPenVisible and PenFill.IsSlow(AMatrix));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -950,7 +935,7 @@ var
|
|
i: Integer;
|
|
i: Integer;
|
|
begin
|
|
begin
|
|
pts := GetAffineBox(AMatrix, true).AsPolygon;
|
|
pts := GetAffineBox(AMatrix, true).AsPolygon;
|
|
- If BackVisible then
|
|
|
|
|
|
+ If GetBackVisible then
|
|
begin
|
|
begin
|
|
if (BackFill.FillType = vftSolid) then backScan := nil
|
|
if (BackFill.FillType = vftSolid) then backScan := nil
|
|
else backScan := BackFill.CreateScanner(AMatrix, ADraft);
|
|
else backScan := BackFill.CreateScanner(AMatrix, ADraft);
|
|
@@ -1015,7 +1000,7 @@ begin
|
|
|
|
|
|
backScan.Free;
|
|
backScan.Free;
|
|
end;
|
|
end;
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
if (PenFill.FillType = vftSolid) then penScan := nil
|
|
if (PenFill.FillType = vftSolid) then penScan := nil
|
|
else penScan := PenFill.CreateScanner(AMatrix, ADraft);
|
|
else penScan := PenFill.CreateScanner(AMatrix, ADraft);
|
|
@@ -1044,12 +1029,12 @@ var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
xMargin, yMargin: single;
|
|
xMargin, yMargin: single;
|
|
begin
|
|
begin
|
|
- if not (BackVisible or (rboAssumeBackFill in AOptions)) and not PenVisible(rboAssumePenFill in AOptions) then
|
|
|
|
|
|
+ if not (GetBackVisible or (rboAssumeBackFill in AOptions)) and not GetPenVisible(rboAssumePenFill in AOptions) then
|
|
result:= EmptyRectF
|
|
result:= EmptyRectF
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
result := inherited GetRenderBounds(ADestRect, AMatrix, AOptions);
|
|
result := inherited GetRenderBounds(ADestRect, AMatrix, AOptions);
|
|
- if PenVisible(rboAssumePenFill in AOptions) then
|
|
|
|
|
|
+ if GetPenVisible(rboAssumePenFill in AOptions) then
|
|
begin
|
|
begin
|
|
if (JoinStyle <> pjsMiter) or (Stroker.MiterLimit <= 1) then
|
|
if (JoinStyle <> pjsMiter) or (Stroker.MiterLimit <= 1) then
|
|
begin
|
|
begin
|
|
@@ -1080,9 +1065,9 @@ var
|
|
box: TAffineBox;
|
|
box: TAffineBox;
|
|
begin
|
|
begin
|
|
box := GetAffineBox(AffineMatrixIdentity, true);
|
|
box := GetAffineBox(AffineMatrixIdentity, true);
|
|
- if BackVisible and box.Contains(APoint) then
|
|
|
|
|
|
+ if GetBackVisible and box.Contains(APoint) then
|
|
result := true else
|
|
result := true else
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
pts := ComputeStroke(box.AsPolygon, true, AffineMatrixIdentity);
|
|
pts := ComputeStroke(box.AsPolygon, true, AffineMatrixIdentity);
|
|
result:= IsPointInPolygon(pts, APoint, true);
|
|
result:= IsPointInPolygon(pts, APoint, true);
|
|
@@ -1095,7 +1080,7 @@ var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
box: TAffineBox;
|
|
box: TAffineBox;
|
|
begin
|
|
begin
|
|
- if PenVisible or BackVisible then
|
|
|
|
|
|
+ if GetPenVisible or GetBackVisible then
|
|
begin
|
|
begin
|
|
box := GetAffineBox(AffineMatrixIdentity, true);
|
|
box := GetAffineBox(AffineMatrixIdentity, true);
|
|
pts := ComputeStrokeEnvelope(box.AsPolygon, true, ARadius*2);
|
|
pts := ComputeStrokeEnvelope(box.AsPolygon, true, ARadius*2);
|
|
@@ -1109,7 +1094,7 @@ var
|
|
box: TAffineBox;
|
|
box: TAffineBox;
|
|
scan: TBGRACustomScanner;
|
|
scan: TBGRACustomScanner;
|
|
begin
|
|
begin
|
|
- if BackVisible then
|
|
|
|
|
|
+ if GetBackVisible then
|
|
begin
|
|
begin
|
|
box := GetAffineBox(AffineMatrixIdentity, true);
|
|
box := GetAffineBox(AffineMatrixIdentity, true);
|
|
result := box.Contains(APoint);
|
|
result := box.Contains(APoint);
|
|
@@ -1127,7 +1112,7 @@ function TRectShape.PointInPen(APoint: TPointF): boolean;
|
|
var
|
|
var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
begin
|
|
begin
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
pts := GetAffineBox(AffineMatrixIdentity, true).AsPolygon;
|
|
pts := GetAffineBox(AffineMatrixIdentity, true).AsPolygon;
|
|
pts := ComputeStroke(pts,true, AffineMatrixIdentity);
|
|
pts := ComputeStroke(pts,true, AffineMatrixIdentity);
|
|
@@ -1143,16 +1128,6 @@ end;
|
|
|
|
|
|
{ TEllipseShape }
|
|
{ TEllipseShape }
|
|
|
|
|
|
-function TEllipseShape.PenVisible(AAssumePenFill: boolean): boolean;
|
|
|
|
-begin
|
|
|
|
- result := (PenWidth>0) and not IsClearPenStyle(PenStyle) and (not PenFill.IsFullyTransparent or AAssumePenFill);
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
-function TEllipseShape.BackVisible: boolean;
|
|
|
|
-begin
|
|
|
|
- result := not BackFill.IsFullyTransparent;
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
function TEllipseShape.GetCornerPositition: single;
|
|
function TEllipseShape.GetCornerPositition: single;
|
|
begin
|
|
begin
|
|
result := sqrt(2)/2;
|
|
result := sqrt(2)/2;
|
|
@@ -1196,7 +1171,7 @@ begin
|
|
IncludePoint(m*YAxis);
|
|
IncludePoint(m*YAxis);
|
|
IncludePoint(m*(Origin-(XAxis-Origin)));
|
|
IncludePoint(m*(Origin-(XAxis-Origin)));
|
|
IncludePoint(m*(Origin-(YAxis-Origin)));
|
|
IncludePoint(m*(Origin-(YAxis-Origin)));
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
zoom := (VectLen(AMatrix[1,1],AMatrix[2,1])+VectLen(AMatrix[1,2],AMatrix[2,2]))/2;
|
|
zoom := (VectLen(AMatrix[1,1],AMatrix[2,1])+VectLen(AMatrix[1,2],AMatrix[2,2]))/2;
|
|
result.Left -= zoom*PenWidth/2;
|
|
result.Left -= zoom*PenWidth/2;
|
|
@@ -1223,7 +1198,7 @@ begin
|
|
begin
|
|
begin
|
|
center := (orthoRect.TopLeft+orthoRect.BottomRight)*0.5;
|
|
center := (orthoRect.TopLeft+orthoRect.BottomRight)*0.5;
|
|
radius := (orthoRect.BottomRight-orthoRect.TopLeft)*0.5;
|
|
radius := (orthoRect.BottomRight-orthoRect.TopLeft)*0.5;
|
|
- If BackVisible then
|
|
|
|
|
|
+ If GetBackVisible then
|
|
begin
|
|
begin
|
|
if BackFill.FillType = vftSolid then backScan := nil
|
|
if BackFill.FillType = vftSolid then backScan := nil
|
|
else backScan := BackFill.CreateScanner(AMatrix, ADraft);
|
|
else backScan := BackFill.CreateScanner(AMatrix, ADraft);
|
|
@@ -1244,7 +1219,7 @@ begin
|
|
|
|
|
|
backScan.Free;
|
|
backScan.Free;
|
|
end;
|
|
end;
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
if PenFill.FillType = vftSolid then penScan := nil
|
|
if PenFill.FillType = vftSolid then penScan := nil
|
|
else penScan := PenFill.CreateScanner(AMatrix, ADraft);
|
|
else penScan := PenFill.CreateScanner(AMatrix, ADraft);
|
|
@@ -1288,7 +1263,7 @@ begin
|
|
begin
|
|
begin
|
|
m:= MatrixForPixelCentered(AMatrix);
|
|
m:= MatrixForPixelCentered(AMatrix);
|
|
pts := ComputeEllipse(m*FOrigin, m*FXAxis, m*FYAxis);
|
|
pts := ComputeEllipse(m*FOrigin, m*FXAxis, m*FYAxis);
|
|
- If BackVisible then
|
|
|
|
|
|
+ If GetBackVisible then
|
|
begin
|
|
begin
|
|
if BackFill.FillType = vftSolid then backScan := nil
|
|
if BackFill.FillType = vftSolid then backScan := nil
|
|
else backScan := BackFill.CreateScanner(AMatrix, ADraft);
|
|
else backScan := BackFill.CreateScanner(AMatrix, ADraft);
|
|
@@ -1308,7 +1283,7 @@ begin
|
|
|
|
|
|
backScan.Free;
|
|
backScan.Free;
|
|
end;
|
|
end;
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
if PenFill.FillType = vftSolid then penScan := nil
|
|
if PenFill.FillType = vftSolid then penScan := nil
|
|
else penScan := PenFill.CreateScanner(AMatrix, ADraft);
|
|
else penScan := PenFill.CreateScanner(AMatrix, ADraft);
|
|
@@ -1336,12 +1311,12 @@ function TEllipseShape.GetRenderBounds({%H-}ADestRect: TRect; AMatrix: TAffineMa
|
|
var
|
|
var
|
|
xMargin, yMargin: single;
|
|
xMargin, yMargin: single;
|
|
begin
|
|
begin
|
|
- if not (BackVisible or (rboAssumeBackFill in AOptions)) and not PenVisible(rboAssumePenFill in AOptions) then
|
|
|
|
|
|
+ if not (GetBackVisible or (rboAssumeBackFill in AOptions)) and not GetPenVisible(rboAssumePenFill in AOptions) then
|
|
result:= EmptyRectF
|
|
result:= EmptyRectF
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
result := inherited GetRenderBounds(ADestRect, AMatrix, AOptions);
|
|
result := inherited GetRenderBounds(ADestRect, AMatrix, AOptions);
|
|
- if PenVisible(rboAssumePenFill in AOptions) then
|
|
|
|
|
|
+ if GetPenVisible(rboAssumePenFill in AOptions) then
|
|
begin
|
|
begin
|
|
xMargin := (abs(AMatrix[1,1])+abs(AMatrix[1,2]))*PenWidth*0.5;
|
|
xMargin := (abs(AMatrix[1,1])+abs(AMatrix[1,2]))*PenWidth*0.5;
|
|
yMargin := (abs(AMatrix[2,1])+abs(AMatrix[2,2]))*PenWidth*0.5;
|
|
yMargin := (abs(AMatrix[2,1])+abs(AMatrix[2,2]))*PenWidth*0.5;
|
|
@@ -1358,9 +1333,9 @@ var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
begin
|
|
begin
|
|
pts := ComputeEllipse(FOrigin, FXAxis, FYAxis);
|
|
pts := ComputeEllipse(FOrigin, FXAxis, FYAxis);
|
|
- if BackVisible and IsPointInPolygon(pts, APoint, true) then
|
|
|
|
|
|
+ if GetBackVisible and IsPointInPolygon(pts, APoint, true) then
|
|
result := true else
|
|
result := true else
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
pts := ComputeStroke(pts, true, AffineMatrixIdentity);
|
|
pts := ComputeStroke(pts, true, AffineMatrixIdentity);
|
|
result:= IsPointInPolygon(pts, APoint, true);
|
|
result:= IsPointInPolygon(pts, APoint, true);
|
|
@@ -1372,7 +1347,7 @@ function TEllipseShape.PointInShape(APoint: TPointF; ARadius: single): boolean;
|
|
var
|
|
var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
begin
|
|
begin
|
|
- if PenVisible or BackVisible then
|
|
|
|
|
|
+ if GetPenVisible or GetBackVisible then
|
|
begin
|
|
begin
|
|
pts := ComputeEllipse(FOrigin, FXAxis, FYAxis);
|
|
pts := ComputeEllipse(FOrigin, FXAxis, FYAxis);
|
|
pts := ComputeStrokeEnvelope(pts, true, ARadius*2);
|
|
pts := ComputeStrokeEnvelope(pts, true, ARadius*2);
|
|
@@ -1386,7 +1361,7 @@ var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
scan: TBGRACustomScanner;
|
|
scan: TBGRACustomScanner;
|
|
begin
|
|
begin
|
|
- if BackVisible then
|
|
|
|
|
|
+ if GetBackVisible then
|
|
begin
|
|
begin
|
|
pts := ComputeEllipse(FOrigin, FXAxis, FYAxis);
|
|
pts := ComputeEllipse(FOrigin, FXAxis, FYAxis);
|
|
result:= IsPointInPolygon(pts, APoint, true);
|
|
result:= IsPointInPolygon(pts, APoint, true);
|
|
@@ -1404,7 +1379,7 @@ function TEllipseShape.PointInPen(APoint: TPointF): boolean;
|
|
var
|
|
var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
begin
|
|
begin
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
pts := ComputeEllipse(FOrigin, FXAxis, FYAxis);
|
|
pts := ComputeEllipse(FOrigin, FXAxis, FYAxis);
|
|
pts := ComputeStroke(pts,true, AffineMatrixIdentity);
|
|
pts := ComputeStroke(pts,true, AffineMatrixIdentity);
|
|
@@ -1418,24 +1393,24 @@ var
|
|
ab: TAffineBox;
|
|
ab: TAffineBox;
|
|
backSurface, totalSurface, penSurface: Single;
|
|
backSurface, totalSurface, penSurface: Single;
|
|
begin
|
|
begin
|
|
- if not PenVisible and not BackVisible then
|
|
|
|
|
|
+ if not GetPenVisible and not GetBackVisible then
|
|
result := false
|
|
result := false
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
ab := GetAffineBox(AMatrix, true);
|
|
ab := GetAffineBox(AMatrix, true);
|
|
backSurface := ab.Surface*Pi/4;
|
|
backSurface := ab.Surface*Pi/4;
|
|
- if PenVisible then
|
|
|
|
|
|
+ if GetPenVisible then
|
|
begin
|
|
begin
|
|
penSurface := (ab.Width+ab.Height)*(Pi/2)*PenWidth;
|
|
penSurface := (ab.Width+ab.Height)*(Pi/2)*PenWidth;
|
|
- if BackVisible then
|
|
|
|
|
|
+ if GetBackVisible then
|
|
totalSurface:= backSurface+penSurface/2
|
|
totalSurface:= backSurface+penSurface/2
|
|
else
|
|
else
|
|
totalSurface := penSurface;
|
|
totalSurface := penSurface;
|
|
end else
|
|
end else
|
|
totalSurface := backSurface;
|
|
totalSurface := backSurface;
|
|
result := (totalSurface > 640*480) or
|
|
result := (totalSurface > 640*480) or
|
|
- ((backSurface > 320*240) and BackVisible and BackFill.IsSlow(AMatrix)) or
|
|
|
|
- ((penSurface > 320*240) and PenVisible and PenFill.IsSlow(AMatrix));
|
|
|
|
|
|
+ ((backSurface > 320*240) and GetBackVisible and BackFill.IsSlow(AMatrix)) or
|
|
|
|
+ ((penSurface > 320*240) and GetPenVisible and PenFill.IsSlow(AMatrix));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1484,11 +1459,6 @@ begin
|
|
EndUpdate;
|
|
EndUpdate;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TPhongShape.BackVisible: boolean;
|
|
|
|
-begin
|
|
|
|
- result := not BackFill.IsFullyTransparent;
|
|
|
|
-end;
|
|
|
|
-
|
|
|
|
function TPhongShape.GetEnvelope: ArrayOfTPointF;
|
|
function TPhongShape.GetEnvelope: ArrayOfTPointF;
|
|
var
|
|
var
|
|
box: TAffineBox;
|
|
box: TAffineBox;
|
|
@@ -1662,7 +1632,7 @@ var
|
|
rectRenderF,rectRasterF: TRectF;
|
|
rectRenderF,rectRasterF: TRectF;
|
|
rectRender,rectRaster, prevClip: TRect;
|
|
rectRender,rectRaster, prevClip: TRect;
|
|
begin
|
|
begin
|
|
- if not BackVisible then exit;
|
|
|
|
|
|
+ if not GetBackVisible then exit;
|
|
|
|
|
|
//determine final render bounds
|
|
//determine final render bounds
|
|
rectRenderF := GetRenderBounds(InfiniteRect,AMatrix);
|
|
rectRenderF := GetRenderBounds(InfiniteRect,AMatrix);
|
|
@@ -1790,7 +1760,7 @@ end;
|
|
function TPhongShape.GetRenderBounds(ADestRect: TRect; AMatrix: TAffineMatrix;
|
|
function TPhongShape.GetRenderBounds(ADestRect: TRect; AMatrix: TAffineMatrix;
|
|
AOptions: TRenderBoundsOptions): TRectF;
|
|
AOptions: TRenderBoundsOptions): TRectF;
|
|
begin
|
|
begin
|
|
- if not (BackVisible or (rboAssumeBackFill in AOptions)) then
|
|
|
|
|
|
+ if not (GetBackVisible or (rboAssumeBackFill in AOptions)) then
|
|
result:= EmptyRectF
|
|
result:= EmptyRectF
|
|
else
|
|
else
|
|
result := inherited GetRenderBounds(ADestRect, AMatrix, AOptions);
|
|
result := inherited GetRenderBounds(ADestRect, AMatrix, AOptions);
|
|
@@ -1800,7 +1770,7 @@ function TPhongShape.PointInShape(APoint: TPointF): boolean;
|
|
var
|
|
var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
begin
|
|
begin
|
|
- if not BackVisible then exit(false);
|
|
|
|
|
|
+ if not GetBackVisible then exit(false);
|
|
pts := GetEnvelope;
|
|
pts := GetEnvelope;
|
|
result := IsPointInPolygon(pts, APoint, true);
|
|
result := IsPointInPolygon(pts, APoint, true);
|
|
end;
|
|
end;
|
|
@@ -1809,7 +1779,7 @@ function TPhongShape.PointInShape(APoint: TPointF; ARadius: single): boolean;
|
|
var
|
|
var
|
|
pts: ArrayOfTPointF;
|
|
pts: ArrayOfTPointF;
|
|
begin
|
|
begin
|
|
- if BackVisible then
|
|
|
|
|
|
+ if GetBackVisible then
|
|
begin
|
|
begin
|
|
pts := ComputeStrokeEnvelope(GetEnvelope, true, ARadius*2);
|
|
pts := ComputeStrokeEnvelope(GetEnvelope, true, ARadius*2);
|
|
result:= IsPointInPolygon(pts, APoint, true);
|
|
result:= IsPointInPolygon(pts, APoint, true);
|
|
@@ -1834,7 +1804,7 @@ function TPhongShape.GetIsSlow(const AMatrix: TAffineMatrix): boolean;
|
|
var
|
|
var
|
|
ab: TAffineBox;
|
|
ab: TAffineBox;
|
|
begin
|
|
begin
|
|
- if not BackVisible then exit(false);
|
|
|
|
|
|
+ if not GetBackVisible then exit(false);
|
|
ab := GetAffineBox(AMatrix, true);
|
|
ab := GetAffineBox(AMatrix, true);
|
|
result := ab.Surface > 320*240;
|
|
result := ab.Surface > 320*240;
|
|
end;
|
|
end;
|