pleyo.com

/src/trunk2/BAL/Interfaces/graphics/BIGraphicsDevice.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2007 Pleyo.  All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions
00006  * are met:
00007  *
00008  * 1.  Redistributions of source code must retain the above copyright
00009  *     notice, this list of conditions and the following disclaimer.
00010  * 2.  Redistributions in binary form must reproduce the above copyright
00011  *     notice, this list of conditions and the following disclaimer in the
00012  *     documentation and/or other materials provided with the distribution.
00013  * 3.  Neither the name of Pleyo nor the names of
00014  *     its contributors may be used to endorse or promote products derived
00015  *     from this software without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY PLEYO AND ITS CONTRIBUTORS "AS IS" AND ANY
00018  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00019  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00020  * DISCLAIMED. IN NO EVENT SHALL PLEYO OR ITS CONTRIBUTORS BE LIABLE FOR ANY
00021  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00022  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00023  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00024  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00025  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00026  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00027  */
00028 
00040 #ifndef BIGRAPHICSDEVICE_H
00041 #define BIGRAPHICSDEVICE_H
00042 
00043 #include <stdint.h>
00044 #include "RGBA32Array.h"
00045 
00046 namespace WebCore {
00047 
00048 class Image;
00049 class IntPoint;
00050 class IntRect;
00051 class Color;
00052 
00053 }
00054 
00060 namespace BAL {
00061 
00062 class BINativeImage;
00063 class BISurface;
00064 class BTWidget;
00065 
00066 class BIGraphicsDevice {
00067 public:
00075     virtual void initialize(uint16_t width, uint16_t height, uint8_t depth) = 0;
00076 
00080     virtual void finalize() = 0;
00081 
00086     virtual BINativeImage* createNativeImage(const WebCore::IntSize size) = 0;
00087 
00094     virtual BINativeImage* createNativeImage(RGBA32Array&, const WebCore::IntSize size) = 0;
00095 
00104     virtual void copy(const BTWidget&, const BINativeImage&, WebCore::IntRect zone, WebCore::IntPoint, const uint8_t alphaChannel = 255) = 0;
00105 
00114     virtual void drawArc(const BTWidget&, const WebCore::IntRect, uint16_t startAngle, uint16_t angleSpan, const WebCore::Color) = 0;
00115 
00122     virtual void drawEllipse(const BTWidget&, WebCore::IntRect, const WebCore::Color) = 0;
00123 
00131     virtual void drawLine(const BTWidget&, WebCore::IntPoint, WebCore::IntPoint, const WebCore::Color) = 0;
00132 
00139     virtual void drawRect(const BTWidget&, WebCore::IntRect, const WebCore::Color) = 0;
00140 
00150     virtual void fillConvexPolygon(const BTWidget&, size_t numPoints, const WebCore::IntPoint*, const WebCore::Color) = 0;
00151 
00158     virtual void fillRect(const BTWidget&, WebCore::IntRect, const WebCore::Color) = 0;
00159 
00165     virtual void setClip(const BTWidget&, WebCore::IntRect) = 0;
00166 
00172     virtual WebCore::IntRect clip(const BTWidget&) = 0;
00173 
00183     virtual void stretchBlit(const BTWidget&, const BINativeImage&, WebCore::IntRect src, WebCore::IntRect dst, const uint8_t alphaChannel = 255) = 0;
00184 
00189     virtual WebCore::IntSize size() const = 0;
00190 
00196     virtual void update(const BTWidget&, const WebCore::IntRect) = 0;
00197 
00204     virtual void clear(const BTWidget&, const WebCore::IntRect) = 0;
00205 
00209     virtual ~BIGraphicsDevice() {}
00210 };
00211 
00212 }
00213 
00214 #endif // BIGRAPHICSDEVICE_H
00215 
00216 

Generated on Wed Nov 21 20:04:17 2007 for Origyn Web Browser by Doxygen 1.5.3

pleyo.com
pleyo.com