//
// Copyright (C) 1999-2004 Toshikaz Hirabayashi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// TOSHIKAZ HIRABAYASHI BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
// OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// Except as contained in this notice, the name of Toshikaz Hirabayashi shall
// not be used in advertising or otherwise to promote the sale, use or other
// dealings in this Software without prior written authorization from
// Toshikaz Hirabayashi.

#ifndef WSDDRAW_H
#define WSDDRAW_H

#include <WScom.h>
#include <WSCroot.h>
#include <WSClistData.h>
#include <WSDdev.h>
#include <WSDcolor.h>
class WSCbase;

class WSDdraw  :public WSCroot{

  public:
    WSDdraw();
    virtual ~WSDdraw();

    virtual long setForeColor(short cid) = 0;
    virtual long setBackColor(short cid) = 0;
    virtual long setForeColor(WSDcolor*) = 0;
    virtual long setBackColor(WSDcolor*) = 0;
    virtual long setLineWidth(short) = 0;
    virtual long setHatchPattern(char no) = 0;
    virtual long setLineDashType(char no) = 0;
    virtual long setRegion(short x,short y,WSCushort w,WSCushort h) = 0;
    virtual long beginDraw(WSDdev*,long prm1,long prm2,long prm3) =0;
    virtual long endDraw() =0;
    virtual long drawArc(short x,short y,WSCushort width,WSCushort height,short a1,short a2) =0;
    virtual long drawFillArc(short x,short y,WSCushort width,WSCushort height,short a1,short a2,char kind) = 0;
    virtual long drawLine(short x1,short y1,short x2,short y2) = 0;
    virtual long drawLines(WSCpoint*,long num) = 0;
    virtual long drawRect(short x,short y,WSCushort w,WSCushort h) = 0;
    virtual long drawGradation(long type,short col1,short col2,short col3,
             short x,short y,WSCushort w,WSCushort h,WSCuchar grad_margin) = 0;
    virtual long drawFillRect(short x,short y,WSCushort w,WSCushort h) = 0;
    virtual long drawRects(WSCrect*,long num) = 0;
    virtual long drawFillRects(WSCrect*,long num) = 0;
    virtual long drawPoly(WSCpoint*,long num) = 0;
    virtual long drawFillPoly(WSCpoint*,long num) = 0;
    virtual long drawImage(short x,short y,WSCushort,WSCushort,WSDimage*,char align) = 0;
    virtual long drawImage(short x,short y,short sx,short sy,WSCushort,WSCushort,WSDimage*) = 0;

    virtual long drawStretchedImage(short x,short y,WSCushort w,WSCushort h,
                                    WSDimage*) = 0;

    virtual long drawString(long x,long y,WSCulong w,WSCulong h,WSCstring*,
                            char font,char align,long cur,WSCbool inter_cur,
                            long scur1=0,long scur2=0) =0;

    virtual long drawUString(long x,long y,WSCulong w,WSCulong h,WSCushort*,
                             char font,char align,long cur,WSCbool inter_cur,
                             long scur1=0,long scur2=0) =0;

    virtual long drawFillString(long x,long y,WSCulong w,WSCulong h,WSCstring*,
                                 char font,char align,short cur,WSCbool inter_cur) =0;

    virtual long drawFillUString(long x,long y,WSCulong w,WSCulong h,WSCushort*,
                                 char font,char align,short cur,WSCbool inter_cur) =0;

    virtual long setValue(long kind,long val);
     WSMFclassDef(WSDdraw,WSCroot);
};
#endif
