Wide Studio Object Reference

Wide Studio Home
Up to


Class Name

WSCvdrawingArea

Methods

  • void setBlinkFore(WSCbool)   :WSCnwbase
  • void setOutSideMousePress(WSCbool)   :WSCnwbase
  • void setOutSideMouseMove(WSCbool)   :WSCnwbase
  • void setOutSideMouseRelease(WSCbool)   :WSCnwbase
  • void setMouseGrabed(WSCbool)   :WSCnwbase
  • WSCbool getOutSideMousePress()   :WSCnwbase
  • WSCbool getOutSideMouseMove()   :WSCnwbase
  • WSCbool getOutSideMouseRelease()   :WSCnwbase
  • WSCbool getMouseGrabed()   :WSCnwbase
  • long initialize()   :WSCbase
  • WSCbool getInitialized()   :WSCbase
  • char* getInstanceName()   :WSCbase
  • char* getClassName()   :WSCbase
  • void* cast(char*)   :WSCbase
  • void setInstanceName(char*)   :WSCbase
  • WSCbool setProperty(char*,const WSCvariant &)   :WSCbase
  • WSCvariant getProperty(char*)   :WSCbase
  • void setVisible(WSCbool)   :WSCbase
  • WSCbool getVisible()   :WSCbase
  • void setSensitive(WSCbool)   :WSCbase
  • WSCbool getSensitive()   :WSCbase
  • long draw()   :WSCbase
  • long redraw()   :WSCbase
  • long update()   :WSCbase
  • WSClistData & getChildren()   :WSCbase
  • long getAllChildren(WSClistData &)   :WSCbase
  • void execProcedure(long trigger)   :WSCbase
  • void execProcedure(char* procedure_name)   :WSCbase
  • long setFocus(WSCbool fl = True)   :WSCbase
  • WSCbool getFocus()   :WSCbase
  • virutal void onMouseIn(WSCpoint*)   :WSCbase
  • virutal void onMouseOut()   :WSCbase
  • virutal void onMouseMove(WSCpoint*)   :WSCbase
  • virutal void onMousePress(WSCpoint*)   :WSCbase
  • virutal void onMouseRelease(WSCpoint*)   :WSCbase
  • virutal void onExpose(WSCrect*)   :WSCbase
  • virutal void onResize(WSCrect*)   :WSCbase
  • virutal void onVisibleChange(WSCbool)   :WSCbase
  • virutal void onParentVisibleChange(WSCbool)   :WSCbase
  • virutal void onSensitiveChange(WSCbool)   :WSCbase
  • virutal void onParentSensitiveChange(WSCbool)   :WSCbase
  • virutal void onChildAdded(WSCbase*)   :WSCbase
  • long setForeColor(char*)   :WSCvdrawingArea
  • long setBackColor(char*)   :WSCvdrawingArea
  • long setLineWidth(short)   :WSCvdrawingArea
  • long setLineDashType(char)   :WSCvdrawingArea
  • long setHatchPattern(char)   :WSCvdrawingArea
  • long setRegion(short x,short y,unsigned short w,unsigned short h)   :WSCvdrawingArea
  • long drawArc(short x,short y,unsinged short w,unsinged short h,short _a1,short a2)   :WSCvdrawingArea
  • long drawFillArc(short x,short y,unsinged short w,unsinged short h,short _a1,short a2,char kind)   :WSCvdrawingArea
  • long drawLine(short x,short y,short x2,short y2)   :WSCvdrawingArea
  • long drawLines(WSCpoint*,long num)   :WSCvdrawingArea
  • long drawRect(short x,short y,unsinged short w,unsiged short h)   :WSCvdrawingArea
  • long drawFillRect(short x,short y,unsinged short w,unsiged short h)   :WSCvdrawingArea
  • long drawRects(WSCrect*,long num)   :WSCvdrawingArea
  • long drawFillRects(WSCrect*,long num)   :WSCvdrawingArea
  • long drawPoly(WSCpoint*,long num)   :WSCvdrawingArea
  • long drawFillPoly(WSCpoint*,long num)   :WSCvdrawingArea


Specification of methods



setBlinkFore method

Form
void setBlinkFore(WSCbool fl)
Function
Set the fore state(drawn by fore color) or the opposite state(disappeared or drawn by blink color) of the blink.
Description
True: the fore state, False: the opposite state
Parameters
(in)WSCbase fl the state
Return value
Nothing.
Notice



setOutSideMousePress method

Form
void setOutSideMousePress(WSCbool fl)
Function
Sets the flag whether it receives the mouse pressed event of the parent instance which is out of the own area.
Description
Parameters
(in)WSCbase fl True:receive ,False:discard
Return value
Nothing.
Notice



setOutSideMouseMove method

Form
void setOutSideMouseMove(WSCbool fl)
Function
Sets the flag whether it receives the mouse moved event of the parent instance which is out of the own area.
Description
Parameters
(in)WSCbase fl True:receive ,False:discard
Return value
Noting.
Notice



setOutSideMouseRelease method

Form
void setOutSideMouseRelease(WSCbool fl)
Function
Sets the flag whether it receives the mouse released event of the parent instance which is out of the own area.
Description
Parameters
(in)WSCbase fl True:receive ,False:discard
Return value
Noting.
Notice



getOutSideMousePress method

Form
WSCbool getOutSideMousePress()
Function
Returns the flag whether it receives the mouse pressed event of the parent instance which is out of the own area.
Description
Parameters
Noting.
Return value
True:receive, False:discard.
Notice



getOutSideMouseMove method

Form
WSCbool getOutSideMouseMove()
Function
Returns the flag whether it receives the mouse moved event of the parent instance which is out of the own area.
Description
Parameters
Nothing.
Return value
True:receive, False:discard.
Notice



getOutSideMouseRelease method

Form
WSCbool getOutSideMouseMove()
Function
Returns the flag whether it receives the mouse released event of the parent instance which is out of the own area.
Description
Parameters
Nothing.
Return value
True:receive, False:discard.
Notice



initialize method

Form
long initialize()
Function
Initializes the instance.
Description
Parameters
Nothing.
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice
It requires calling this initilize method once, before calling the others.



getInitialized method

Form
WSCbool getInitialized()
Function
Returns the status of initializing.
Description
Acquires whether the instance is initialized.
Parameters
Nothing.
Return value
Returns True if initialized; returns False if not.
Notice



getInstanceName method

Form
char* getInstanceName()
Function
Returns the instance name.
Description
Parameters
Nothing.
Return value
Returns the instance name.
Notice
Do not delete the return value, and it will become invalid by calling setInstanceName().



setInstanceName method

Form
void setInstanceName(char*)
Function
Specifies the instance name.
Description
Parameters
(in)char* pname instance name
Return value
Nothing.
Notice



getClassName method

Form
char* getClassName()
Function
Returns the class name of the instance.
Description
Parameters
Nothing.
Return value
Returns the class name.
Notice
Do not delete the return value.



cast method

Form
void* cast(char* class_name)
Function
Supplies the function of down cast. Usually C++ language does not allow to cast a abstract pointer to a pointer of child class. So the instance has all child class pointer, cast() method seek for a specified class pointer from contained all the pointer of child classes.
Description
Parameters
(in)char* class_name child class name
Return value
Returns the pointer. If specified class does not relate, returns NULL.
Notice
Please use the returned pointer as follows.
  extern WSCbase* object;
  // WSCvlabel* label = (WSCvlabel*)object; //C++ does not allow this..
  WSCvlabel* label = (WSCvlabel*)object->cast("WSCvlabel");
  if (label == NULL){
    //if this "object" does not relate to WSCvlabel class,
    //returns NULL.
  }else{
    //it is OK.
    //this "object" is the child class of WSCvlabel.
    //cast void* to WSCvlabel* ...
  }



setProperty method

Form
WSCbool setProperty(char* pname,const WSCvariant &)
Function
Sets the value into the property.
Description
Seeks for the specified property, and sets the value into it.
Parameters
(in)char* pname the property name
(in)WSCvariant & value the value
Return value
Returns True if it succeeds,False if it fails.
Notice
Second parameter requires any types which it can cast to WSCvariant.



getProperty method

Form
WSCvariant getProperty(char* pname)
Function
Returns the value of the specified property
Description
Seeks for the specified property, and returns the value of it.
Parameters
(in)char* pname the property name
Return value
Returns the value by WSCvariant type.
Notice



setVisible method

Form
void setVisible(WSCbool fl)
Function
Specifies the status of visibility.
Description
Parameters
(in)WSCbool fl visibility True=visible,False=invisible
Return value
Nothing.
Notice
This state is equal with the WSNvis property.



getVisible method

Form
WSCbool getVisible()
Function
Returns the status of visibility.
Description
Returns the status of visibility includes the parent instance.
Parameters
Nothing.
Return value
Returns the current visibility.
Notice
The return value is not always equal with the WSNvis property, because it includes the status of the parent instance. it returns False if the parent instance is invisible and the instance is visible.



setSensitive method

Form
void setSensitive(WSCbool fl)
Function
Specifies the state of sensibility.
Description
Parameters
(in)WSCbool fl True=sensitive,False=insensitive
Return value
Nothing.
Notice
if the parent instance is insensitive and the instance is sensitive,it becomes insensitive.



getVisible method

Form
WSCbool getVisible()
Function
Returns the sensibility
Description
Returns the sensibility includes the parent instance.
Parameters
Nothing.
Return value
Returns the current sensibility.
Notice
The return value is not always equal with the WSNdet property, because it includes the status of the parent instance. it returns False if the parent instance is insensitive and the instance is sensitive.



draw method

Form
long draw()
Function
Draws the instance.
Description
Parameters
Nothing
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice
It do not draw if the instance is drawed once, so if you want to draw it forcibly,execute the method: setAbsoluteDraw(True).



redraw method

Form
long redraw()
Function
Clears and draws the instance.
Description
Parameters
Nothing.
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice



update method

Form
long update()
Function
If needed, clears and draws the instance.
Description
A change of properties causes the necessity of updating.
Parameters
Nothing.
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice



getChildren method

Form
WSClistData & getChildren()
Function
Returns the list of child instances. It functions this method of the classes which have a management ability of child instances.
Description
Parameters
Nothing.
Return value
Returns the list of child instances.
Notice
The accessing of child instances is as follows. The "parent" is a management class like the WSCform,WSCwindow class which has child instances.
  WSClistData chidlren = parent->getChildren();
  int num = children.getNum();
  for(int i=0; i < num; i++){
    WSCbase* child = (WSCbase*)children[i];
    //do someting to child instance...
  }




execProcedure method

Form
void execProcedure(long trigger)
Function
Executes the event procedures by specified trigger.
Description
Parameters
(in)long trigger the trigger
Return value
Nothing.
Notice
This method does nothing,if there are no event procedures.



execProcedure method

Form
void execProcedure(char* pname)
Function
Executes the event procedures by specified procedure name.
Description
Parameters
(in)char* pname Event procedure name
Return value
Nothing.
Notice
This method does nothing,if there are no event procedures.



setFocus method

Form
long setFocus(WSCbool fl = True)
Function
Changes the state of the keyboard focus.
Description
Parameters
(in)WSCbool fl True = focused, False = lost focus
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice
By changing of the state,it executes the event method: onFocusChange().



getFocus method

Form
WSCbool getFocus()
Function
Returns the state of the keyboard focus.
Description
Parameters
Nothing.
Return value
Returns True if it is focused; returns False if not.
Notice



getAllChildren method

Form
long getAllChildren(WSClistData &list)
Function
Returns all of the children.
Description
getChildren() returns the children of the instance,but getAllChildren() returns all of the children of the instance and its children,... recursively.
Parameters
(out)WSClistData & list the list which contains the return value.
Return value
Returns WS_NO_ERR if it succeeds; returns the other if it fails.
Notice



getParentWindow method

Form
WSCbase* getParentWindow()
Function
Returns the parent application window of the instance.
Description
Follows the parents,and finds the top parent instance, then,returns it.
Parameters
Nothing.
Return value
Returns the application window.
Notice
Returns the instance, if the instance is the application window.



onMouseIn method

Form
virtual void onMouseIn(WSCpoint* pt)
Function
It executes this method when the mouse pointer moves into the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_IN trigger, the WSEV_MOUSE_IN event can be handled by overloading of this method.
Parameters
(out)WSCpoint* pt the coordinate of the mouse pointer
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onMouseOut method

Form
virtual void onMouseOut()
Function
It executes this method when the mouse pointer leaves the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_OUT trigger, the WSEV_MOUSE_OUT event can be handled by overloading of this method.
Parameters
Nothing.
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onMouseMove method

Form
virtual void onMouseMove(WSCpoint* pt)
Function
It executes this method when the mouse pointer moves in the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_MOVE trigger, the WSEV_MOUSE_MOVE event can be handled by overloading of this method.
Parameters
(out)WSCpoint* pt the coordinate of the mouse pointer
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onMousePress method

Form
virtual void onMousePress(WSCpoint* pt)
Function
It executes this method when the mouse pointer pressed in the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_PRESS trigger, the WSEV_MOUSE_PRESS event can be handled by overloading of this method.
Parameters
(out)WSCpoint* pt the coordinate of the mouse pointer
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onMouseRelease method

Form
virtual void onMouseRelease(WSCpoint* pt)
Function
It executes this method when the mouse pointer Released in the area of the instance.
Description
Instead of the event procedure by the WSEV_MOUSE_RELEASE trigger, the WSEV_MOUSE_RELEASE event can be handled by overloading of this method.
Parameters
(out)WSCpoint* pt the coordinate of the mouse pointer
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onExpose method

Form
virtual void onExpose(WSCrect* rect)
Function
It executes this method when the instance is exposed.
Description
Instead of the event procedure by the WSEV_EXPOSE trigger, the WSEV_EXPOSE event can be handled by overloading of this method.
Parameters
(out)WSCrect* rect the coordinate of the exposed area
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onResize method

Form
virtual void onResize(WSCrect* rect)
Function
It executes this method when the instance is resized.
Description
Instead of the event procedure by the WSEV_RESIZE trigger, the WSEV_RESIZE event can be handled by overloading of this method.
Parameters
(out)WSCrect* rect the coordinate, width, height of the instace
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onVisibleChange method

Form
virtual void onVisibleChange(WSCbool vis)
Function
It executes this method when the state of the visibility is changed.
Description
Instead of the event procedure by the WSEV_VISIBLE_CH trigger, the WSEV_VISIBLE_CH event can be handled by overloading of this method.
Parameters
(out)WSCbool vis the new state of the visibility
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onParentVisibleChange method

Form
virtual void onParentVisibleChange(WSCbool vis)
Function
It executes this method when the state of the parent's visibility is changed.
Description
Instead of the event procedure by the WSEV_PARENT_VISIBLE_CH trigger, the WSEV_PARENT_VISIBLE_CH event can be handled by overloading of this method.
Parameters
(out)WSCbool vis the new state of the parent's visibility
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onSensitiveChange method

Form
virtual void onSensitiveChange(WSCbool det)
Function
It executes this method when the state of the sensibility is changed.
Description
Instead of the event procedure by the WSEV_SENSITIVE_CH trigger, the WSEV_SENSITIVE_CH event can be handled by overloading of this method.
Parameters
(out)WSCbool det the new state of the sensibility
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onParentSensitiveChange method

Form
virtual void onParentSensitiveChange(WSCbool det)
Function
It executes this method when the state of the parent's sensibility is changed.
Description
Instead of the event procedure by the WSEV_PARENT_SENSITIVE_CH trigger, the WSEV_PARENT_SENSITIVE_CH event can be handled by overloading of this method.
Parameters
(out)WSCbool det the state of the parent's sensibility
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



onChildAdded method

Form
virtual void onChildAdded(WSCbase* child)
Function
It executes this method when the child is added to the instance.
Description
the added child instance event can be handled by overloading of this method.
Parameters
(out)WSCbase* child the added child instance
Return value
Nothing.
Notice
If needed, overload this method on the sub classes.



setForeColor method

Form
long setForeColor(char* cname)
Function
This method sets the foreground color by the specified color name.
Description
This method gets the color from the fore color name, and sets it to the internal graphic context.
Parameters
(in)char* cname the color name
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice
The color name is a format as followings.
#RRGGBB
RR: 00 - ff: The brightness of red.
RR: 00 - ff: The brightness of green.
RR: 00 - ff: The brightness of blue.



setBackColor method

Form
long setBacKColor(char* cname)
Function
This method sets the background color by the specified color name.
Description
This method gets the color from the fore color name, and sets it to the internal graphic context.
Parameters
(in)char* cname the color name
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice
The color name is a format as followings.
#RRGGBB
RR: 00 - ff: The brightness of red.
RR: 00 - ff: The brightness of green.
RR: 00 - ff: The brightness of blue.



setLineWidth method

Form
long setLineWidth(short linewidth)
Function
This method sets the line width.
Description
This method sets the line width which is used by the drawLine method to draw it.
Parameters
(in)short linewidth the line width
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice
Nothing.



setLineDashType method

Form
long setLineDashType(char no)
Function
This method sets the dash type of the line.
Description
This method sets the dash type of the line which is used by the drawLine method to draw it.
Parameters
(in)char no The dash type No.

The following values are available.
The dash type No. Description
0 Sound
1 Dashed
2 Double Dashed
3 Double Dashed2
4 Double Dashed3
5 Double Dashed4
6 Double Dashed5
7 Double Dashed6
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



setHatchPattern method

Form
long setHatchPattern(char no)
Function
This method sets the hatch pattern which is used by drawFillxxx method.
Description
This method sets the hatch pattern to the internal graphic context.
Parameters
(in)char no The hatch pattern No.

The following values are available.
The hatch pattern No. Description
0 Plane
1 Oblique lines1
2 Oblique lines2
3 Vert. lines
4 Horiz. lines
5 Oblique closs
6 Lattice
7 Dots
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



setRegion method

Form
long setRegion(short x,short y,unsigned short w,unsigned short h);
Function
This method limits the area for painting.
Description
It effects nothing to draw outside of the specified area.
Parameters
(in)short x x of the left top
(in)short y y of the left top
(in)unsigned short w the width
(in)unsigned short h the height
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawArc method

Form
long drawArc(short x,short y,unsigned short w, unsigned short h,short a1,short a2);
Function
Draws an arc,circle,oval.
Description
Specify the width and heigth of the circle or oval, and the left-handed start angle from the horizontally right direction,and the stop angle. It is important to set value which is multipled by 64 to the degree. To draw a circle you can set 0 to the start angle,and 360*64 to the stop angle.
Parameters
(in)short x The X coordinate of the top left
(in)short y The Y coordinate of the top left
(in)unsigned short w The width
(in)unsigned short h The height
(in)short a1 The start angle
(in)short a2 The stop angle
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawFillArc method

Form
long drawFillArc(short x,short y,unsigned short w, unsigned short h,short a1,short a2,char kind);
Function
Draws an filled arc(pie,chord), filled circle,filled oval.
Description
Specify the width and heigth of the circle or oval, and the left-handed start angle from the horizontally right direction,and the stop angle. It is important to set value which is multipled by 64 to the degree. To draw a circle you can set 0 to the start angle,and 360*64 to the stop angle.
Parameters
(in)short x The X coordinate of the top left
(in)short y The Y coordinate of the top left
(in)unsigned short w The width
(in)unsigned short h The height
(in)short a1 The start angle
(in)short a2 The stop angle
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawLine method

Form
long drawLine(short x1,short y1,short x2,short y2);
Function
Draws a line.
Description
Draws a line from (x1,y1) to (x2,y2).
Parameters
(in)short x1 The X coordinate of start point
(in)short y1 The Y coordinate of start point
(in)short x2 The X coordinate of end point
(in)short y2 The Y coordinate of end point
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawLines method

Form
long drawLines(WSCpoint* pt,long num);
Function
Draws a poly-line.
Description
Draws a poly-line from (x1,y1) to (Xn,Yn).
Parameters
(in)WSCpoint* pt The array of the point
(in)long num The number of the points

WSCpoint struct has two member:(x, y).
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawRect method

Form
long drawRect(short x,short y,unsigned short w,unsigned short h);
Function
Draws a rectangle.
Description
Draws a rectanble with the top-left point(x,y) and the width:w, the height:h.
Parameters
(in)short x The X coordinate
(in)short y The Y coordinate
(in)unsigned short x The width
(in)unsigned short y The height
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawFillRect method

Form
long drawFillRect(short x,short y,unsigned short w,unsigned short h);
Function
Draws a filled rectangle.
Description
Draws a filled rectanble with the top-left point(x,y) and the width:w, the height:h.
Parameters
(in)short x The X coordinate
(in)short y The Y coordinate
(in)unsigned short x The width
(in)unsigned short y The height
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawRects method

Form
long drawRects(WSCrect* pt,long num);
Function
Draws rectangles.
Description
Draws rectanbles with WSCrect array.
Parameters
(in)WSCrect* rect The array of WSCrect
(in)long num The number of rectangles

WSCrect struct has four member:(x, y,width,height).
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawFillRects method

Form
long drawFillRects(WSCrect* pt,long num);
Function
Draws filled rectangles.
Description
Draws filled rectanbles with WSCrect array.
Parameters
(in)WSCrect* rect The array of WSCrect
(in)long num The number of rectangles

WSCrect struct has four member:(x, y,width,height).
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawPoly method

Form
long drawPoly(WSCpoint* pt,long num);
Function
Draw a poligon.
Description
Draw a poligon with specified points.
Parameters
(in)WSCpoint* pt The points
(in)long num The number of the points

WSCpoint struct has two member:(x, y).
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawFillPoly method

Form
long drawFillPoly(WSCpoint* pt,long num);
Function
Draw a filled poligon.
Description
Draw a filled poligon with specified points.
Parameters
(in)WSCpoint* pt The points
(in)long num The number of the points

WSCpoint struct has two member:(x, y).
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawGradation method

Form
long drawGradation(long type,short col1,short col2, short col3,short x,short y,WSCushort w,WSCushort h, WSCuchar grad_margin);
Function
Draws a rectangle which color gradated.
Description
Draws a rectangle with gradated color from col1 to col2, and from col2 to col3.
Parameters
(in)long type The type of gradation
(in)short col1 Color1
(in)short col2 Color2
(in)short col3 Color3
(in)short x The X coordinate of top-left
(in)short y The Y coordinate of top-left
(in)WSCushort w The width
(in)WSCushort h The height
(in)WSCuchar grad_margin The width of pure color2

The following values are available for the gradation type.
The gradation type Description
WS_GR_LT_RB Left-top to Right-bottom
WS_GR_RT_LB Right-top to Left-bottom
WS_GR_LB_RT Left-bottom to Right-top
WS_GR_RB_LT Right-bottom to Left-top
WS_GR_T_B Top to Bottom
WS_GR_B_T Bottom to Top
WS_GR_L_R Left to Right
WS_GR_R_L Right to Left
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawImage method

Form
long drawImage(short x,short y,WSCushort w,WSCushort h, WSDimage* img,char align);
Function
Draws an image.
Description
Draws the specified image on the specified area.
Parameters
(in)short x The X coordinate
(in)short y The Y coordinate
(in)WSCushort w The width
(in)WSCushort h The height
(in)WSDimage* img The image
(in)char align The alignment of the image

The following values are available for the alignment.
The alignment Description
WS_LEFT Left
WS_RIGHT Right
WS_CENTER Center
WS_TOP Top
WS_BOTTOM Bottom
WS_LEFT_TOP LeftTop
WS_LEFT_BOTTOM LeftBottom
WS_RIGHT_BOTTOM RightBottom
WS_RIGHT_TOP RightTop
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawStretchedImage method

Form
long drawStretchedImage(short x,short y, WSCushort w,WSCushort h, WSDimage* img);
Function
Draws a stretched image.
Description
Draws the specified image adjusted into the specified rectangle.
Parameters
(in)short x The X coordinate
(in)short y The Y coordinate
(in)WSCushort w The width
(in)WSCushort h The height
(in)WSDimage* img The image

Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawString method

Form
long drawString(short x,short y,WSCushort w,WSCushort h, char font_no,char align,char* string, long encoding = WS_EN_DEFAULT);
Function
Draws the specified string in the specified area.
Description
Draws the specified string by the specified encoding in the specified area.
Parameters
(in)short x The X coordinate
(in)short x The Y coordinate
(in)WSCushort w The width
(in)WSCushort h The height
(in)char font_no The font number
(in)char align The alignment
(in)char* string The string
(in)long encoding The encoding

Specify the font number between 0 to 7. The following values are available for the alignment.
The alignment Description
WS_LEFT Left
WS_RIGHT Right
WS_CENTER Center
WS_TOP Top
WS_BOTTOM Bottom
WS_LEFT_TOP LeftTop
WS_LEFT_BOTTOM LeftBottom
WS_RIGHT_BOTTOM RightBottom
WS_RIGHT_TOP RightTop

The following values are available for the encoding.
If it is omitted, it is treated that WS_EN_DEFAULT is specified.
The encoding Description
WS_EN_DEFAULT The project defaults
WS_EN_LOCALE The LANG environment value
WS_EN_NONE Nothing
WS_EN_ISO8859_1 ISO8859(1)
WS_EN_ISO8859_2 ISO8859(2)
WS_EN_ISO8859_3 ISO8859(3)
WS_EN_ISO8859_4 ISO8859(4)
WS_EN_ISO8859_5 ISO8859(5)
WS_EN_ISO8859_6 ISO8859(6)
WS_EN_ISO8859_7 ISO8859(7)
WS_EN_ISO8859_8 ISO8859(8)
WS_EN_ISO8859_9 ISO8859(9)
WS_EN_ISO8859_10 ISO8859(10)
WS_EN_ISO8859_11 ISO8859(11)
WS_EN_ISO8859_12 ISO8859(12)
WS_EN_ISO8859_13 ISO8859(13)
WS_EN_ISO8859_14 ISO8859(14)
WS_EN_ISO8859_15 ISO8859(15)
WS_EN_UTF8 UNICODE(UTF8)
WS_EN_KOI8R KOI8R
WS_EN_EUCJP EUC(JAPANESE)
WS_EN_SJIS SJIS(JAPANESE)
WS_EN_EUCKR EUC(KOREAN)
WS_EN_EUCCN EUC(CHINESE)
WS_EN_BIG5 BIG5(CHINESE)
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice



drawFillString method

Form
long drawFillString(short x,short y,WSCushort w,WSCushort h, char font_no,char align,char* string, long encoding = WS_EN_DEFAULT);
Function
Draws the specified string in the specified filled rectangle.
Description
Draws the specified string by the specified encoding in the specified filled rectangle.
Parameters
(in)short x The X coordinate
(in)short x The Y coordinate
(in)WSCushort w The width
(in)WSCushort h The height
(in)char font_no The font number
(in)char align The alignment
(in)char* string The string
(in)long encoding The encoding

See drawString method.
Return value
Returns WS_NO_ERR if it successed,returns WS_ERR if not.
Notice


Document Release 1.0

For Use with Wide Studio Release 1.0, Summer 2000


Wide Stuido Home | Up to

Copyright(C) T. Hirabayashi, 2000 Last modified: July 01, 2000