0031039: Visualization - add elliptical gradient background style

Added new elliptical gradient fill method and updated vbackground command.
Renamed enum values of Aspect_GradientFillMethod and defined aliases for old ones.
Changed draw mode in OpenGl_BackgroundArray from triangle-strip to GL_TRIANGLES.
This commit is contained in:
achesnok
2021-09-21 18:42:21 +03:00
committed by kgv
parent 3be25c1170
commit 9af0d66b84
11 changed files with 182 additions and 101 deletions

View File

@@ -188,11 +188,11 @@ public:
//! and the fill method (horizontal by default).
Standard_EXPORT void SetBgGradientColors (const Quantity_Color& theColor1,
const Quantity_Color& theColor2,
const Aspect_GradientFillMethod theFillStyle = Aspect_GFM_HOR,
const Aspect_GradientFillMethod theFillStyle = Aspect_GradientFillMethod_Horizontal,
const Standard_Boolean theToUpdate = Standard_False);
//! Defines the gradient background fill method of the view.
Standard_EXPORT void SetBgGradientStyle (const Aspect_GradientFillMethod theMethod = Aspect_GFM_HOR,
Standard_EXPORT void SetBgGradientStyle (const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal,
const Standard_Boolean theToUpdate = Standard_False);
//! Defines the background texture of the view by supplying the texture image file name

View File

@@ -130,7 +130,7 @@ public:
//! attached to the viewer by supplying the colour objects
void SetDefaultBgGradientColors (const Quantity_Color& theColor1,
const Quantity_Color& theColor2,
const Aspect_GradientFillMethod theFillStyle = Aspect_GFM_HOR)
const Aspect_GradientFillMethod theFillStyle = Aspect_GradientFillMethod_Horizontal)
{
myGradientBackground.SetColors (theColor1, theColor2, theFillStyle);
}