2.2.4.24.33 Layer::ViewToWorld


Description

Convert logical to world coordinates.

Syntax

BOOL ViewToWorld( const double * pView, double * pWorld, int nCount, int nDim = 0 )

Parameters

pView
[input] pointer to view coordinates buffer
pWorld
[output] pointer to world coordinates buffer
nCount
[input] the number of values in the buffer
nDim
[input] optional dimension specifier. 0=all dimensions, 1=only 1st, 2=only 2nd dimension, etc.

Return

0 if success.

Examples

EX1

void ViewToWorld_ex1()
{
    GraphLayer gl = Project.ActiveLayer();
    if( gl )
      {
          double world[2];
          double view[2];
          world[0] = 3.123456789012345;
          world[1] = 7.123456789012345;
          int nError = gl.WorldToView(world, view, 2);
          nError = gl.ViewToWorld(view, world, 2);
    }
}

Remark

See Also

Layer::WorldToView

Header to Included

origin.h