WideStudio Logo
WideStudio
Programming Guide
WideStudio Index
Table of contents


The controlling of the position of the instances by the offset



The offset of X,Y coordinate

It is possible to control the position of the instances of WSCvXXX class which has no window resource by the method: setXOffsetPtr and setYOffsetPtr. For example, the following event procedure with initializing trigger shows setting the offset.

extern short xoffset; //A
extern short yoffset; //A
void initep(WSCbase* object){
  object->setXOffsetPt(&xoffset); //B
  object->setYOffsetPt(&yoffset); //B
}

At first,define a global short variable somewhere and do extern to access it at (A). set it as offset to the instance at B. Then the instance will be indicated at the position of the coordinate which is added the offset variable. It is possible to set same variable to many instances and to control their position by it at once.

The scaling offset of the size of the instance

It is possible to control the size of the instances of WSCvXXX class by the method: setScaleOffsetPtr. For example, the following event procedure with initializing trigger shows setting the scaling offset.

extern double scaleoffset; //A
void initep(WSCbase* object){
  object->setScaleOffsetPt(&scaleoffset); //B
}

At first,define a global double variable somewhere and do extern to access it at (A). set it as scaling offset to the instance at B. Then the instance will be indicated at the size which is multiplied by the scaling offset variable. It is possible to set same variable to many instances and to control their size by it at once.

Document Release 3.80 for WideStudio ver 3.80, Jan 2005


WideStudio documents index | Table of contents

Copyright(C) WideStudio Development Team, 1999-2005 Last modified: Jan 05, 2005