SOL9 2.0 Class: Extent

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * Extent.h 
 * Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL++2000

#pragma once

#include <sol\Object.h>

namespace SOL {

class Extent :public Object {
private:
    UINT width;
    UINT height;
public:
    Extent() {
        width  = 0; 
        height = 0; 
    }
    Extent(UINT w, UINT h) {
        width  = w;
        height = h;
    }
    Extent(const Extent& extent) {
        width  = extent.getWidth();
        height = extent.getHeight();
    }
    Extent(Extent* extent) {
        width  = extent->getWidth();
        height = extent->getHeight();
    }

    UINT     getWidth() const  { return width; }
    UINT     getHeight() const { return height; }
    void     get(UINT* w, UINT* h) const {
            *w = width; 
            *h = height;    
    }
    void     set(UINT w, UINT h) {
            width  = w;
            height = h;
    }
};

}



Last modified: 1 Feb 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.