1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0028726: Quantity_NameOfColor should be replaced by Quantity_Color in function input argument

AIS_InteractiveObject, virtual methods ::SetColor(), ::Color()
returning/accepting Quantity_NameOfColor have been removed.
Virtual method ::SetMaterial() accepting Graphic3d_NameOfMaterial has been also removed.

V3d_View, V3d_Viewer, V3d_AmbientLight, V3d_DirectionalLight,
V3d_Light, V3d_PositionalLight, V3d_SpotLight, Aspect_Window,
methods accepting Quantity_NameOfColor have been removed (duplicates)
or color argument(s) replaced with Quantity_Color.
This commit is contained in:
kgv
2017-05-11 18:10:53 +03:00
committed by bugmaster
parent 5ecc46c08e
commit 87432b8278
71 changed files with 426 additions and 1585 deletions

View File

@@ -21,7 +21,6 @@
#include <Prs3d_BasicAspect.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_NameOfColor.hxx>
//! A framework for displaying arrows in representations of dimensions and relations.
class Prs3d_ArrowAspect : public Prs3d_BasicAspect
@@ -55,8 +54,6 @@ public:
Quantity_Length Length() const { return myLength; }
void SetColor (const Quantity_Color& theColor) { myArrowAspect->SetColor (theColor); }
void SetColor (const Quantity_NameOfColor theColor) { SetColor (Quantity_Color (theColor)); }
const Handle(Graphic3d_AspectLine3d)& Aspect() const { return myArrowAspect; }

View File

@@ -33,13 +33,6 @@ public:
//! - the type of line aType
//! - the width value aWidth
//! - aNumber, the number of isoparameters to be displayed.
Prs3d_IsoAspect (const Quantity_NameOfColor theColor,
const Aspect_TypeOfLine theType,
const Standard_Real theWidth,
const Standard_Integer theNumber)
: Prs3d_LineAspect (theColor, theType, theWidth),
myNumber (theNumber) {}
Prs3d_IsoAspect (const Quantity_Color& theColor,
const Aspect_TypeOfLine theType,
const Standard_Real theWidth,

View File

@@ -27,15 +27,3 @@ Prs3d_LineAspect::Prs3d_LineAspect (const Quantity_Color& theColor,
{
//
}
// =======================================================================
// function : Prs3d_LineAspect
// purpose :
// =======================================================================
Prs3d_LineAspect::Prs3d_LineAspect (const Quantity_NameOfColor theColor,
const Aspect_TypeOfLine theType,
const Standard_Real theWidth)
: myAspect (new Graphic3d_AspectLine3d (Quantity_Color (theColor), theType, theWidth))
{
//
}

View File

@@ -40,18 +40,14 @@ public:
//! - the type of line aType and
//! - the line thickness aWidth.
//! Type of line refers to whether the line is solid or dotted, for example.
Standard_EXPORT Prs3d_LineAspect (const Quantity_NameOfColor theColor, const Aspect_TypeOfLine theType, const Standard_Real theWidth);
Standard_EXPORT Prs3d_LineAspect (const Quantity_Color& theColor, const Aspect_TypeOfLine theType, const Standard_Real theWidth);
Prs3d_LineAspect(const Handle(Graphic3d_AspectLine3d)& theAspect) : myAspect (theAspect) {}
void SetColor (const Quantity_Color& theColor) { myAspect->SetColor (theColor); }
//! Sets the line color defined at the time of construction.
//! Default value: Quantity_NOC_YELLOW
void SetColor (const Quantity_NameOfColor theColor) { myAspect->SetColor (Quantity_Color (theColor)); }
void SetColor (const Quantity_Color& theColor) { myAspect->SetColor (theColor); }
//! Sets the type of line defined at the time of construction.
//! This could, for example, be solid, dotted or made up of dashes.
//! Default value: Aspect_TOL_SOLID

View File

@@ -28,18 +28,6 @@ Prs3d_PointAspect::Prs3d_PointAspect (const Aspect_TypeOfMarker theType,
//
}
// =======================================================================
// function : Prs3d_PointAspect
// purpose :
// =======================================================================
Prs3d_PointAspect::Prs3d_PointAspect (const Aspect_TypeOfMarker theType,
const Quantity_NameOfColor theColor,
const Standard_Real theScale)
: myAspect (new Graphic3d_AspectMarker3d (theType, Quantity_Color(theColor), theScale))
{
//
}
// =======================================================================
// function : Prs3d_PointAspect
// purpose :

View File

@@ -30,8 +30,6 @@ class Prs3d_PointAspect : public Prs3d_BasicAspect
public:
Standard_EXPORT Prs3d_PointAspect(const Aspect_TypeOfMarker theType, const Quantity_Color& theColor, const Standard_Real theScale);
Standard_EXPORT Prs3d_PointAspect(const Aspect_TypeOfMarker theType, const Quantity_NameOfColor theColor, const Standard_Real theScale);
//! Defines the user defined marker point.
Standard_EXPORT Prs3d_PointAspect (const Quantity_Color& theColor,
@@ -41,12 +39,10 @@ public:
Prs3d_PointAspect (const Handle(Graphic3d_AspectMarker3d)& theAspect) : myAspect (theAspect) {}
void SetColor (const Quantity_Color& theColor) { myAspect->SetColor (theColor); }
//! defines the color to be used when drawing a point.
//! Default value: Quantity_NOC_YELLOW
void SetColor (const Quantity_NameOfColor theColor) { myAspect->SetColor (Quantity_Color (theColor)); }
void SetColor (const Quantity_Color& theColor) { myAspect->SetColor (theColor); }
//! defines the type of representation to be used when drawing a point.
//! Default value: Aspect_TOM_PLUS
void SetTypeOfMarker (const Aspect_TypeOfMarker theType) { myAspect->SetType (theType); }

View File

@@ -40,22 +40,10 @@ public:
//! Change the polygons interior color and material ambient color.
Standard_EXPORT void SetColor (const Quantity_Color& aColor, const Aspect_TypeOfFacingModel aModel = Aspect_TOFM_BOTH_SIDE);
//! Change the polygons interior color and material ambient color.
void SetColor (const Quantity_NameOfColor theColor,
const Aspect_TypeOfFacingModel theModel = Aspect_TOFM_BOTH_SIDE)
{
SetColor (Quantity_Color (theColor), theModel);
}
//! Change the polygons material aspect.
Standard_EXPORT void SetMaterial (const Graphic3d_MaterialAspect& aMaterial, const Aspect_TypeOfFacingModel aModel = Aspect_TOFM_BOTH_SIDE);
void SetMaterial (const Graphic3d_NameOfMaterial theMaterial, const Aspect_TypeOfFacingModel theModel = Aspect_TOFM_BOTH_SIDE)
{
SetMaterial (Graphic3d_MaterialAspect (theMaterial), theModel);
}
//! Change the polygons transparency value.
//! Warning : aValue must be in the range 0,1. 0 is the default (NO transparent)
Standard_EXPORT void SetTransparency (const Standard_Real aValue, const Aspect_TypeOfFacingModel aModel = Aspect_TOFM_BOTH_SIDE);

View File

@@ -35,12 +35,10 @@ public:
Standard_EXPORT Prs3d_TextAspect();
Standard_EXPORT Prs3d_TextAspect(const Handle(Graphic3d_AspectText3d)& theAspect);
void SetColor (const Quantity_Color& theColor) { myTextAspect->SetColor (theColor); }
//! Sets the color of the type used in text display.
void SetColor (const Quantity_NameOfColor theColor) { myTextAspect->SetColor (Quantity_Color (theColor)); }
void SetColor (const Quantity_Color& theColor) { myTextAspect->SetColor (theColor); }
//! Sets the font used in text display.
void SetFont (const Standard_CString theFont) { myTextAspect->SetFont (theFont); }