OpendTect-6_4  6.4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
uiGraphicsSceneAxis Class Reference

To draw simple axes for a 2D coordinate system. More...

Public Member Functions

 ~uiGraphicsSceneAxis ()
 
 uiGraphicsSceneAxis (uiGraphicsScene &)
 
void setPosition (bool isx, bool istoporleft, bool isinside)
 
void setWorldCoords (const Interval< double > &)
 
void setViewRect (const uiRect &)
 
void setZValue (int nv)
 
void turnOn (bool)
 
void setAnnotInside (bool yn)
 
void enableAxisLine (bool yn)
 
void enableGridLines (bool yn)
 
void setAnnotInInt (bool yn)
 
void enableMask (bool yn)
 
void setTextFactor (int n)
 
void setLineStyle (const OD::LineStyle &lst)
 
void setGridLineStyle (const OD::LineStyle &gls)
 
void setFontData (const FontData &)
 

Protected Member Functions

void reDraw ()
 
void drawAtPos (float worldpos, bool drawgrid, int &curtextitm, int &curlineitm)
 
int getNrAnnotChars () const
 

Protected Attributes

bool inside_
 
bool isx_
 
bool istop_
 
bool drawaxisline_
 
bool drawgridlines_
 
bool annotinint_
 
uiGraphicsScenescene_
 
uiGraphicsItemGroupitmgrp_
 
uiRectItemmask_
 
uiRect viewrect_
 
ObjectSet< uiLineItemlines_
 
ObjectSet< uiTextItemtexts_
 
Interval< double > rg_
 
OD::LineStyle ls_
 
OD::LineStyle gridls_
 
SamplingData< double > sampling_
 
int txtfactor_
 
FontData fontdata_
 

Detailed Description

To draw simple axes for a 2D coordinate system.

This class is designed for normal axis drawing and is not applicable to axes which are oblique to the X/Y axis of window. The area for drawing axis can be on the same canvas with the main graph area or on different canvas. Refer to uiCrossplot or uiDistributionMap for an example.

Axis values are marked at every step. Grid lines can also be drawn at each step. Before calling the drawing routines, make sure the proper line pattern and pen color are set for the 'ioDrawTool' and there is enough room in the window to draw the axis and number annotation.

USAGE: 1) Call setupAxis() to set up the position for drawing axis and a pointer to uiWorld2Ui which provides the coordinate conversion functions. The axis range and step is calculated automatically from the class uiWorld2Ui. 2) If the default range and step are not to be used for axis annotation, call setFixedDataRangeandStep() to override after calling setupAxis(). 3) Call the actual draw functions

Constructor & Destructor Documentation

uiGraphicsSceneAxis::~uiGraphicsSceneAxis ( )
uiGraphicsSceneAxis::uiGraphicsSceneAxis ( uiGraphicsScene )

Member Function Documentation

void uiGraphicsSceneAxis::drawAtPos ( float  worldpos,
bool  drawgrid,
int &  curtextitm,
int &  curlineitm 
)
protected
void uiGraphicsSceneAxis::enableAxisLine ( bool  yn)
inline
void uiGraphicsSceneAxis::enableGridLines ( bool  yn)
inline
void uiGraphicsSceneAxis::enableMask ( bool  yn)
int uiGraphicsSceneAxis::getNrAnnotChars ( ) const
protected
void uiGraphicsSceneAxis::reDraw ( )
protected
void uiGraphicsSceneAxis::setAnnotInInt ( bool  yn)
inline
void uiGraphicsSceneAxis::setAnnotInside ( bool  yn)
inline
void uiGraphicsSceneAxis::setFontData ( const FontData )
void uiGraphicsSceneAxis::setGridLineStyle ( const OD::LineStyle gls)
inline
void uiGraphicsSceneAxis::setLineStyle ( const OD::LineStyle lst)
inline
void uiGraphicsSceneAxis::setPosition ( bool  isx,
bool  istoporleft,
bool  isinside 
)
void uiGraphicsSceneAxis::setTextFactor ( int  n)
inline
void uiGraphicsSceneAxis::setViewRect ( const uiRect )
void uiGraphicsSceneAxis::setWorldCoords ( const Interval< double > &  )
void uiGraphicsSceneAxis::setZValue ( int  nv)
void uiGraphicsSceneAxis::turnOn ( bool  )

Member Data Documentation

bool uiGraphicsSceneAxis::annotinint_
protected
bool uiGraphicsSceneAxis::drawaxisline_
protected
bool uiGraphicsSceneAxis::drawgridlines_
protected
FontData uiGraphicsSceneAxis::fontdata_
protected
OD::LineStyle uiGraphicsSceneAxis::gridls_
protected
bool uiGraphicsSceneAxis::inside_
protected
bool uiGraphicsSceneAxis::istop_
protected
bool uiGraphicsSceneAxis::isx_
protected
uiGraphicsItemGroup* uiGraphicsSceneAxis::itmgrp_
protected
ObjectSet<uiLineItem> uiGraphicsSceneAxis::lines_
protected
OD::LineStyle uiGraphicsSceneAxis::ls_
protected
uiRectItem* uiGraphicsSceneAxis::mask_
protected
Interval<double> uiGraphicsSceneAxis::rg_
protected
SamplingData<double> uiGraphicsSceneAxis::sampling_
protected
uiGraphicsScene& uiGraphicsSceneAxis::scene_
protected
ObjectSet<uiTextItem> uiGraphicsSceneAxis::texts_
protected
int uiGraphicsSceneAxis::txtfactor_
protected
uiRect uiGraphicsSceneAxis::viewrect_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019