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.
SetColor( Black );
MyColor2 = Black;
- MyGradientMethod = Aspect_GFM_NONE;
+ MyGradientMethod = Aspect_GradientFillMethod_None;
}
#ifndef _Aspect_GradientBackground_HeaderFile
#define _Aspect_GradientBackground_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <Quantity_Color.hxx>
#include <Aspect_GradientFillMethod.hxx>
#include <Aspect_Background.hxx>
-class Quantity_Color;
-
-//! This class allows the definition of
-//! a window gradient background.
+//! This class allows the definition of a window gradient background.
class Aspect_GradientBackground : public Aspect_Background
{
public:
DEFINE_STANDARD_ALLOC
-
//! Creates a window gradient background.
- //! Default colors : Quantity_NOC_BLACK.
- //! Default fill method : Aspect_GFM_NONE
+ //! Default color is Quantity_NOC_BLACK.
+ //! Default fill method is Aspect_GradientFillMethod_None.
Standard_EXPORT Aspect_GradientBackground();
-
- //! Creates a window gradient background with colours <AColor1, AColor2>.
- Standard_EXPORT Aspect_GradientBackground(const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod AMethod = Aspect_GFM_HOR);
-
- //! Modifies the colours of the window gradient background <me>.
- Standard_EXPORT void SetColors (const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod AMethod = Aspect_GFM_HOR);
-
- //! Returns colours of the window gradient background <me>.
- Standard_EXPORT void Colors (Quantity_Color& AColor1, Quantity_Color& AColor2) const;
-
- //! Returns the current gradient background fill mode.
- Standard_EXPORT Aspect_GradientFillMethod BgGradientFillMethod() const;
-
- //! Dumps the content of me into the stream
- Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+ //! Creates a window gradient background with two colours.
+ Standard_EXPORT Aspect_GradientBackground (const Quantity_Color& theColor1,
+ const Quantity_Color& theColor2,
+ const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal);
+ //! Modifies the colours of the window gradient background.
+ Standard_EXPORT void SetColors (const Quantity_Color& theColor1,
+ const Quantity_Color& theColor2,
+ const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal);
+ //! Returns colours of the window gradient background.
+ Standard_EXPORT void Colors (Quantity_Color& theColor1, Quantity_Color& theColor2) const;
-protected:
-
-
-
+ //! Returns the current gradient background fill mode.
+ Standard_EXPORT Aspect_GradientFillMethod BgGradientFillMethod() const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
private:
-
-
Quantity_Color MyColor2;
Aspect_GradientFillMethod MyGradientMethod;
-
};
-
-
-
-
-
-
#endif // _Aspect_GradientBackground_HeaderFile
#ifndef _Aspect_GradientFillMethod_HeaderFile
#define _Aspect_GradientFillMethod_HeaderFile
-//! Defines the fill methods to
-//! write gradient background in a window.
+//! Defines the fill methods to write gradient background in a window.
enum Aspect_GradientFillMethod
{
-Aspect_GFM_NONE,
-Aspect_GFM_HOR,
-Aspect_GFM_VER,
-Aspect_GFM_DIAG1,
-Aspect_GFM_DIAG2,
-Aspect_GFM_CORNER1,
-Aspect_GFM_CORNER2,
-Aspect_GFM_CORNER3,
-Aspect_GFM_CORNER4
+ Aspect_GradientFillMethod_None, //!< fill method not specified
+ Aspect_GradientFillMethod_Horizontal, //!< gradient directed from left (Color1) to right (Color2)
+ Aspect_GradientFillMethod_Vertical, //!< gradient directed from top (Color1) to bottom (Color2)
+ Aspect_GradientFillMethod_Diagonal1, //!< gradient directed from upper left corner (Color1) to lower right (Color2)
+ Aspect_GradientFillMethod_Diagonal2, //!< gradient directed from upper right corner (Color1) to lower left (Color2)
+ Aspect_GradientFillMethod_Corner1, //!< highlights upper left corner with Color1
+ Aspect_GradientFillMethod_Corner2, //!< highlights upper right corner with Color1
+ Aspect_GradientFillMethod_Corner3, //!< highlights lower right corner with Color1
+ Aspect_GradientFillMethod_Corner4, //!< highlights lower left corner with Color1
+ Aspect_GradientFillMethod_Elliptical, //!< gradient directed from center (Color1) in all directions forming an elliptic shape (Color2)
+
+ // obsolete aliases
+ Aspect_GFM_NONE = Aspect_GradientFillMethod_None,
+ Aspect_GFM_HOR = Aspect_GradientFillMethod_Horizontal,
+ Aspect_GFM_VER = Aspect_GradientFillMethod_Vertical,
+ Aspect_GFM_DIAG1 = Aspect_GradientFillMethod_Diagonal1,
+ Aspect_GFM_DIAG2 = Aspect_GradientFillMethod_Diagonal2,
+ Aspect_GFM_CORNER1 = Aspect_GradientFillMethod_Corner1,
+ Aspect_GFM_CORNER2 = Aspect_GradientFillMethod_Corner2,
+ Aspect_GFM_CORNER3 = Aspect_GradientFillMethod_Corner3,
+ Aspect_GFM_CORNER4 = Aspect_GradientFillMethod_Corner4
};
#endif // _Aspect_GradientFillMethod_HeaderFile
// purpose :
// =======================================================================
OpenGl_BackgroundArray::OpenGl_BackgroundArray (const Graphic3d_TypeOfBackground theType)
-: OpenGl_PrimitiveArray (NULL, Graphic3d_TOPA_TRIANGLESTRIPS, NULL, NULL, NULL),
+: OpenGl_PrimitiveArray (NULL, Graphic3d_TOPA_TRIANGLES, NULL, NULL, NULL),
myType (theType),
myFillMethod (Aspect_FM_NONE),
myViewWidth (0),
myViewHeight (0),
myToUpdate (Standard_False)
{
- myDrawMode = GL_TRIANGLE_STRIP;
+ myDrawMode = GL_TRIANGLES;
myIsFillType = true;
myGradientParams.color1 = OpenGl_Vec4 (0.0f, 0.0f, 0.0f, 1.0f);
myGradientParams.color2 = OpenGl_Vec4 (0.0f, 0.0f, 0.0f, 1.0f);
- myGradientParams.type = Aspect_GFM_NONE;
+ myGradientParams.type = Aspect_GradientFillMethod_None;
}
// =======================================================================
{
switch (myType)
{
- case Graphic3d_TOB_GRADIENT: return myGradientParams.type != Aspect_GFM_NONE;
+ case Graphic3d_TOB_GRADIENT: return myGradientParams.type != Aspect_GradientFillMethod_None;
case Graphic3d_TOB_TEXTURE: return myFillMethod != Aspect_FM_NONE;
case Graphic3d_TOB_CUBEMAP: return Standard_True;
case Graphic3d_TOB_NONE: return Standard_False;
Standard_Boolean OpenGl_BackgroundArray::init (const Handle(OpenGl_Workspace)& theWorkspace) const
{
const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext();
+
+ if (myIndices.IsNull())
+ {
+ myIndices = new Graphic3d_IndexBuffer (Graphic3d_Buffer::DefaultAllocator());
+ }
+ if (myAttribs.IsNull())
+ {
+ myAttribs = new Graphic3d_Buffer (Graphic3d_Buffer::DefaultAllocator());
+ }
+
switch (myType)
{
case Graphic3d_TOB_GRADIENT:
{ Graphic3d_TOA_COLOR, Graphic3d_TOD_VEC3 }
};
- if (myAttribs.IsNull())
- {
- myAttribs = new Graphic3d_Buffer (Graphic3d_Buffer::DefaultAllocator());
- }
if (!myAttribs->Init (4, aGragientAttribInfo, 2))
{
return Standard_False;
switch (myGradientParams.type)
{
- case Aspect_GFM_HOR:
+ case Aspect_GradientFillMethod_Horizontal:
{
aCorners[0] = myGradientParams.color2.ChangeData();
aCorners[1] = myGradientParams.color2.ChangeData();
aCorners[3] = myGradientParams.color1.ChangeData();
break;
}
- case Aspect_GFM_VER:
+ case Aspect_GradientFillMethod_Vertical:
{
aCorners[0] = myGradientParams.color2.ChangeData();
aCorners[1] = myGradientParams.color1.ChangeData();
aCorners[3] = myGradientParams.color1.ChangeData();
break;
}
- case Aspect_GFM_DIAG1:
+ case Aspect_GradientFillMethod_Diagonal1:
{
aCorners[0] = myGradientParams.color2.ChangeData();
aCorners[3] = myGradientParams.color1.ChangeData();
aCorners[2] = aDiagCorner2;
break;
}
- case Aspect_GFM_DIAG2:
+ case Aspect_GradientFillMethod_Diagonal2:
{
aCorners[1] = myGradientParams.color1.ChangeData();
aCorners[2] = myGradientParams.color2.ChangeData();
aCorners[3] = aDiagCorner2;
break;
}
- case Aspect_GFM_CORNER1:
+ case Aspect_GradientFillMethod_Corner1:
{
aVertices[0] = OpenGl_Vec2(float(myViewWidth), float(myViewHeight));
aVertices[1] = OpenGl_Vec2(0.0f, float(myViewHeight));
aCorners[3] = myGradientParams.color2.ChangeData();
break;
}
- case Aspect_GFM_CORNER2:
+ case Aspect_GradientFillMethod_Corner2:
{
aCorners[0] = myGradientParams.color2.ChangeData();
aCorners[1] = myGradientParams.color1.ChangeData();
aCorners[3] = myGradientParams.color2.ChangeData();
break;
}
- case Aspect_GFM_CORNER3:
+ case Aspect_GradientFillMethod_Corner3:
{
aVertices[0] = OpenGl_Vec2(float(myViewWidth), float(myViewHeight));
aVertices[1] = OpenGl_Vec2(0.0f, float(myViewHeight));
aCorners[3] = myGradientParams.color2.ChangeData();
break;
}
- case Aspect_GFM_CORNER4:
+ case Aspect_GradientFillMethod_Corner4:
{
aCorners[0] = myGradientParams.color2.ChangeData();
aCorners[1] = myGradientParams.color2.ChangeData();
aCorners[3] = myGradientParams.color2.ChangeData();
break;
}
- case Aspect_GFM_NONE:
+ case Aspect_GradientFillMethod_Elliptical:
+ {
+ // construction of a circle circumscribed about a view rectangle
+ // using parametric equation (scaled by aspect ratio and centered)
+ const Standard_Integer aSubdiv = 64;
+ if (!myAttribs->Init (aSubdiv + 2, aGragientAttribInfo, 2))
+ {
+ return Standard_False;
+ }
+
+ OpenGl_Vec2 anEllipVerts[aSubdiv + 2];
+ anEllipVerts[0] = OpenGl_Vec2 (float (myViewWidth) / 2.0f, float (myViewHeight) / 2.0f);
+ Standard_Real aTetta = (M_PI * 2.0) / aSubdiv;
+ Standard_Real aParam = 0.0;
+ for (Standard_Integer anIt = 1; anIt < aSubdiv + 2; ++anIt)
+ {
+ anEllipVerts[anIt] = OpenGl_Vec2 (float (Cos (aParam) * Sqrt (2.0) * myViewWidth / 2.0 + myViewWidth / 2.0f),
+ float (Sin (aParam) * Sqrt (2.0) * myViewHeight / 2.0 + myViewHeight / 2.0f));
+
+ aParam += aTetta;
+ }
+ for (Standard_Integer anIt = 0; anIt < aSubdiv + 2; ++anIt)
+ {
+ OpenGl_Vec2* aVertData = reinterpret_cast<OpenGl_Vec2*>(myAttribs->changeValue (anIt));
+ *aVertData = anEllipVerts[anIt];
+
+ OpenGl_Vec3* aColorData = reinterpret_cast<OpenGl_Vec3*>(myAttribs->changeValue (anIt) + myAttribs->AttributeOffset (1));
+ *aColorData = myGradientParams.color2.rgb();
+ }
+ // the central vertex is colored in different way
+ OpenGl_Vec3* aColorData = reinterpret_cast<OpenGl_Vec3*>(myAttribs->changeValue (0) + myAttribs->AttributeOffset (1));
+ *aColorData = myGradientParams.color1.rgb();
+
+ if (!myIndices->Init<unsigned short> (3 * aSubdiv))
+ {
+ return Standard_False;
+ }
+ for (Standard_Integer aCurTri = 0; aCurTri < aSubdiv; aCurTri++)
+ {
+ myIndices->SetIndex (aCurTri * 3 + 0, 0);
+ myIndices->SetIndex (aCurTri * 3 + 1, aCurTri + 1);
+ myIndices->SetIndex (aCurTri * 3 + 2, aCurTri + 2);
+ }
+
+ return Standard_True;
+ }
+ case Aspect_GradientFillMethod_None:
{
break;
}
*aColorData = theCtx->Vec4FromQuantityColor (OpenGl_Vec4(aCorners[anIt][0], aCorners[anIt][1], aCorners[anIt][2], 1.0f)).rgb();
}
+ if (!myIndices->Init<unsigned short>(6))
+ {
+ return Standard_False;
+ }
+ const unsigned short THE_FS_QUAD_TRIS[6] = {0, 1, 2, 1, 3, 2};
+ for (unsigned int aVertIter = 0; aVertIter < 6; ++aVertIter)
+ {
+ myIndices->SetIndex (aVertIter, THE_FS_QUAD_TRIS[aVertIter]);
+ }
return Standard_True;
}
{ Graphic3d_TOA_UV, Graphic3d_TOD_VEC2 }
};
- if (myAttribs.IsNull())
- {
- myAttribs = new Graphic3d_Buffer (Graphic3d_Buffer::DefaultAllocator());
- }
if (!myAttribs->Init (4, aTextureAttribInfo, 2))
{
return Standard_False;
aData[0] = OpenGl_Vec2 (-anOffsetX, aCoef * anOffsetY);
aData[1] = OpenGl_Vec2 (0.0f, aCoef * aTexRangeY);
+ if (!myIndices->Init<unsigned short>(6))
+ {
+ return Standard_False;
+ }
+ const unsigned short THE_FS_QUAD_TRIS[6] = {0, 1, 2, 1, 3, 2};
+ for (unsigned int aVertIter = 0; aVertIter < 6; ++aVertIter)
+ {
+ myIndices->SetIndex (aVertIter, THE_FS_QUAD_TRIS[aVertIter]);
+ }
+
return Standard_True;
}
myIndices = new Graphic3d_IndexBuffer (Graphic3d_Buffer::DefaultAllocator());
}
if (!myAttribs->Init (8, aCubeMapAttribInfo, 1)
- || !myIndices->Init<unsigned short> (14))
+ || !myIndices->Init<unsigned short> (6 * 3 * 2))
{
return Standard_False;
}
aData[7].SetValues ( 1.0, 1.0, -1.0);
}
{
- const unsigned short THE_BOX_TRISTRIP[14] = { 0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1 };
- for (unsigned int aVertIter = 0; aVertIter < 14; ++aVertIter)
+ const unsigned short THE_BOX_TRIS[] =
+ {
+ 0, 1, 2, 2, 1, 3, // top face
+ 1, 5, 7, 1, 7, 3, // right face
+ 0, 6, 4, 0, 2, 6, // left face
+ 4, 6, 5, 6, 7, 5, // bottom face
+ 0, 5, 1, 0, 4, 5, // front face
+ 2, 7, 6, 2, 3, 7 // back face
+ };
+ for (unsigned int aVertIter = 0; aVertIter < 6 * 3 * 2; ++aVertIter)
{
- myIndices->SetIndex (aVertIter, THE_BOX_TRISTRIP[aVertIter]);
+ myIndices->SetIndex (aVertIter, THE_BOX_TRIS[aVertIter]);
}
}
|| myBackgroundType == Graphic3d_TOB_TEXTURE)
{
// Drawing background gradient if:
- // - gradient fill type is not Aspect_GFM_NONE and
+ // - gradient fill type is not Aspect_GradientFillMethod_None and
// - either background texture is no specified or it is drawn in Aspect_FM_CENTERED mode
if (myBackgrounds[Graphic3d_TOB_GRADIENT]->IsDefined()
&& (!myTextureParams->Aspect()->ToMapTexture()
//! 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
//! 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);
}
ViewerTest::ViewerInit (0, 0, anImgParams.Width, anImgParams.Height, "TmpDriver/TmpViewer/TmpView");
aView = ViewerTest::CurrentView();
aView->SetImmediateUpdate (false);
- aView->SetBgGradientStyle (Aspect_GFM_NONE, false);
+ aView->SetBgGradientStyle (Aspect_GradientFillMethod_None, false);
}
if (!aDumpFile.IsEmpty())
}
}
-} ViewerTest_DefaultBackground = { Quantity_NOC_BLACK, Quantity_NOC_BLACK, Quantity_NOC_BLACK, Aspect_GFM_NONE };
+} ViewerTest_DefaultBackground = { Quantity_NOC_BLACK, Quantity_NOC_BLACK, Quantity_NOC_BLACK, Aspect_GradientFillMethod_None };
//==============================================================================
// EVENT GLOBAL VARIABLES
aName.LowerCase();
if (aName == "none")
{
- theMode = Aspect_GFM_NONE;
+ theMode = Aspect_GradientFillMethod_None;
}
else if (aName == "hor"
|| aName == "horizontal")
{
- theMode = Aspect_GFM_HOR;
+ theMode = Aspect_GradientFillMethod_Horizontal;
}
else if (aName == "ver"
|| aName == "vert"
|| aName == "vertical")
{
- theMode = Aspect_GFM_VER;
+ theMode = Aspect_GradientFillMethod_Vertical;
}
else if (aName == "diag"
|| aName == "diagonal"
|| aName == "diag1"
|| aName == "diagonal1")
{
- theMode = Aspect_GFM_DIAG1;
+ theMode = Aspect_GradientFillMethod_Diagonal1;
}
else if (aName == "diag2"
|| aName == "diagonal2")
{
- theMode = Aspect_GFM_DIAG2;
+ theMode = Aspect_GradientFillMethod_Diagonal2;
}
else if (aName == "corner1")
{
- theMode = Aspect_GFM_CORNER1;
+ theMode = Aspect_GradientFillMethod_Corner1;
}
else if (aName == "corner2")
{
- theMode = Aspect_GFM_CORNER2;
+ theMode = Aspect_GradientFillMethod_Corner2;
}
else if (aName == "corner3")
{
- theMode = Aspect_GFM_CORNER3;
+ theMode = Aspect_GradientFillMethod_Corner3;
}
else if (aName == "corner4")
{
- theMode = Aspect_GFM_CORNER4;
+ theMode = Aspect_GradientFillMethod_Corner4;
+ }
+ else if (aName == "ellip"
+ || aName == "elliptical")
+ {
+ theMode = Aspect_GradientFillMethod_Elliptical;
}
else
{
Standard_Integer aNbColors = 0;
Quantity_ColorRGBA aColors[2];
- Aspect_GradientFillMethod aGradientMode = Aspect_GFM_NONE;
+ Aspect_GradientFillMethod aGradientMode = Aspect_GradientFillMethod_None;
bool hasGradientMode = false;
TCollection_AsciiString anImagePath;
{
ViewerTest_DefaultBackground.GradientColor1 = Quantity_Color();
ViewerTest_DefaultBackground.GradientColor2 = Quantity_Color();
- ViewerTest_DefaultBackground.FillMethod = Aspect_GFM_NONE;
+ ViewerTest_DefaultBackground.FillMethod = Aspect_GradientFillMethod_None;
ViewerTest_DefaultBackground.FlatColor = aColors[0].GetRGB();
ViewerTest_DefaultBackground.SetDefaultGradient();
ViewerTest_DefaultBackground.SetDefaultColor();
}
else
{
- aView->SetBgGradientStyle (hasGradientMode ? aGradientMode : Aspect_GFM_NONE);
+ aView->SetBgGradientStyle (hasGradientMode ? aGradientMode : Aspect_GradientFillMethod_None);
aView->SetBackgroundColor (aColors[0].GetRGB());
}
}
{
ViewerTest_DefaultBackground.FillMethod = aGradientMode;
}
- else if (ViewerTest_DefaultBackground.FillMethod == Aspect_GFM_NONE)
+ else if (ViewerTest_DefaultBackground.FillMethod == Aspect_GradientFillMethod_None)
{
- ViewerTest_DefaultBackground.FillMethod = Aspect_GFM_VER;
+ ViewerTest_DefaultBackground.FillMethod = Aspect_GradientFillMethod_Vertical;
}
ViewerTest_DefaultBackground.SetDefaultGradient();
}
if (!hasGradientMode)
{
aGradientMode = aView->GradientBackground().BgGradientFillMethod();
- if (aGradientMode == Aspect_GFM_NONE)
+ if (aGradientMode == Aspect_GradientFillMethod_None)
{
- aGradientMode = Aspect_GFM_VER;
+ aGradientMode = Aspect_GradientFillMethod_Vertical;
}
}
aView->SetBgGradientColors (aColors[0].GetRGB(), aColors[1].GetRGB(), aGradientMode);
theCommands.Add ("vbackground",
"vbackground [-color Color [-default]]"
"\n\t\t: [-gradient Color1 Color2 [-default]"
- "\n\t\t: [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3}]=VERT]"
+ "\n\t\t: [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3|ELLIPTICAL}]=VERT]"
"\n\t\t: [-imageFile ImageFile [-imageMode {CENTERED|TILED|STRETCH|NONE}]=CENTERED [-srgb {0|1}]=1]"
"\n\t\t: [-cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]=0 [-pbrEnv {0|1}]=1]"
"\n\t\t: Changes background or some background settings."
vbackground -default -gradient BLACK GRAY25 -gradientMode HORIZONTAL
vinit View1 w=400 h=400
if { [vreadpixel 399 100 -rgb -name] != "GRAY25" } { puts "Error: bug with default gradient color is reproduced." }
+vdump $imagedir/${casename}_v1.png
vinit View2 w=400 h=400
if { [vreadpixel 399 100 -rgb -name] != "GRAY25" } { puts "Error: bug with default gradient color is reproduced." }
+vdump $imagedir/${casename}_v2.png
vbackground -default -color GRAY50
vinit View3
if { [vreadpixel 100 100 -rgb -name] != "GRAY50" } { puts "Error: bug with default background color is reproduced." }
+vdump $imagedir/${casename}_v3.png
--- /dev/null
+puts "============"
+puts "0031039: Visualization - add elliptical gradient background style"
+puts "============"
+puts ""
+
+pload VISUALIZATION
+vinit View1
+
+vbackground -gradient WHITE BLACK -gradientMode ELLIPTICAL
+vdump $imagedir/${casename}.png