#include <Graphic3d_TransformPers.hxx>
#include <Graphic3d_TransformUtils.hxx>
#include <gp_Ax3.hxx>
-#include <OpenGl_AspectLine.hxx>
#include <OpenGl_Workspace.hxx>
#include <OpenGl_View.hxx>
#include <Precision.hxx>
myLabelValues.SetFontSize (theCtx, myData.ValuesSize());
myAspectLabels.Aspect()->SetTextFontAspect (myData.NamesFontAspect());
- myAspectLabels.Aspect()->SetFont (myData.NamesFont());
+ myAspectLabels.Aspect()->SetTextFont (!myData.NamesFont().IsEmpty()
+ ? new TCollection_HAsciiString (myData.NamesFont())
+ : Handle(TCollection_HAsciiString )());
myAspectValues.Aspect()->SetTextFontAspect (myData.ValuesFontAspect());
- myAspectValues.Aspect()->SetFont (myData.ValuesFont());
+ myAspectValues.Aspect()->SetTextFont (!myData.ValuesFont().IsEmpty()
+ ? new TCollection_HAsciiString (myData.ValuesFont())
+ : Handle(TCollection_HAsciiString )());
// Grid aspect
myGridLineAspect.Aspect()->SetColor (myData.GridColor());
{
const Axis& anAxis = myAxes[theIndex];
- theWorkspace->SetAspectLine (&anAxis.LineAspect);
+ theWorkspace->SetAspects (&anAxis.LineAspect);
const Handle(OpenGl_Context)& aContext = theWorkspace->GetGlContext();
// Reset transformations
if (aCurAspect.ToDrawTickmarks() && aCurAspect.TickmarksNumber() > 0)
{
- theWorkspace->SetAspectLine (&myGridLineAspect);
+ theWorkspace->SetAspects (&myGridLineAspect);
OpenGl_Mat4 aModelMat (theMat);
OpenGl_Vec3 aMiddle (theGridAxes.Ticks[theIndex] + aSizeVec * theGridAxes.Axes[theIndex] * 0.5f + aDir * (Standard_ShortReal)(theDpix * anOffset));
myAspectLabels.Aspect()->SetColor (anAxis.NameColor);
- theWorkspace->SetAspectText (&myAspectLabels);
+ theWorkspace->SetAspects (&myAspectLabels);
anAxis.Label.SetPosition (aMiddle);
anAxis.Label.Render (theWorkspace);
}
if (aCurAspect.ToDrawValues() && aCurAspect.TickmarksNumber() > 0)
{
myAspectValues.Aspect()->SetColor (anAxis.LineAspect.Aspect()->Color());
- theWorkspace->SetAspectText (&myAspectValues);
+ theWorkspace->SetAspects (&myAspectValues);
Standard_Real anOffset = aCurAspect.ValuesOffset() + aCurAspect.TickmarksLength();
for (Standard_Integer anIt = 0; anIt <= aCurAspect.TickmarksNumber(); ++anIt)
Standard_ExtCharacter anAxesState = getGridAxes (aCorners, aGridAxes);
// Remember current aspects
- const OpenGl_AspectLine* anOldAspectLine = theWorkspace->AspectLine();
- const OpenGl_AspectText* anOldAspectText = theWorkspace->AspectText();
+ const OpenGl_Aspects* anOldAspectLine = theWorkspace->Aspects();
OpenGl_Mat4 aModelMatrix;
aModelMatrix.Convert (aContext->WorldViewState.Current());
if (myData.ToDrawGrid())
{
- theWorkspace->SetAspectLine (&myGridLineAspect);
+ theWorkspace->SetAspects (&myGridLineAspect);
// render grid edges
if (anAxesState & XOO_XYO)
renderTickmarkLabels (theWorkspace, aModelMatrix, anIter, aGridAxes, aDpix);
}
- theWorkspace->SetAspectLine (anOldAspectLine);
- theWorkspace->SetAspectText (anOldAspectText);
+ theWorkspace->SetAspects (anOldAspectLine);
aContext->WorldViewState.Pop();
aContext->ApplyWorldViewMatrix();