Logo Search packages:      
Sourcecode: blender version File versions

IMG_BrushRGBA32 Class Reference

#include <IMG_BrushRGBA32.h>

Inheritance diagram for IMG_BrushRGBA32:

IMG_PixmapRGBA32 IMG_Pixmap IMG_Pixmap

List of all members.


Detailed Description

Id
IMG_BrushRGBA32.h,v 1.5 2002/12/27 13:10:19 mein Exp

***** BEGIN GPL/BL DUAL LICENSE BLOCK *****

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The Blender Foundation also sells licenses for use in proprietary software under the Blender License. See http://www.blender.org/BL/ for information about this.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. All rights reserved.

The Original Code is: all of this file.

Contributor(s): none yet.

***** END GPL/BL DUAL LICENSE BLOCK ***** A brush used for drawing in pixmaps. The brush is a pixmap as well. Drawing can be implemented by blending the brush into the pixmap.

Author:
Maarten Gribnau
Date:
March 7, 2001
Todo:
Check the algorithm

Definition at line 47 of file IMG_BrushRGBA32.h.


Public Types

enum  PixelType { kPixelTypeRGB32 = 0, kPixelTypeRGBA32 = 2, kPixelTypeRGB24 = 5 }
enum  TPixelIndex {
  bi_r = 0, bi_g = 1, bi_b = 2, bi_a = 3,
  bi_r = 0, bi_g = 1, bi_b = 2, bi_a = 3
}
enum  TPixelIndex {
  bi_r = 0, bi_g = 1, bi_b = 2, bi_a = 3,
  bi_r = 0, bi_g = 1, bi_b = 2, bi_a = 3
}
typedef TPixelRGBA32TPixelPtr
typedef TPixelRGBA32TPixelPtr
typedef TUns32 TPixelRGBA32
typedef GEN_TUns32 TPixelRGBA32
enum  TPixelType { kPixelTypeUnknown = 0, kPixelTypeRGBA32 = 2 }

Public Member Functions

virtual void blendPixmap (float u, float v, const IMG_PixmapRGBA32 &pixmap)
virtual void blendPixmap (TUns32 x, TUns32 y, const IMG_PixmapRGBA32 &pixmap, const IMG_Rect &bnds)
virtual void blendPixmap (TUns32 x, TUns32 y, const IMG_PixmapRGBA32 &pixmap)
virtual void blendPixmap (const IMG_PixmapRGBA32 &src, const GEN_Rect &srcBnds, const GEN_Rect &destBnds)
void clamp (float &u, float &v) const
void clamp (GEN_TInt32 &x, GEN_TInt32 &y) const
void clampUV (float &u, float &v) const
virtual void fillRect (const IMG_Rect &r, const IMG_ColorRGBA &c)
virtual void fillRect (const IMG_Rect &r, const IMG_ColorRGB &c)
virtual void fillRect (const GEN_Rect &r, const IMG_ColorRGBA &c)
virtual void fillRect (const GEN_Rect &r, const IMG_ColorRGB &c)
void getBounds (IMG_Rect &r) const
void getBounds (GEN_Rect &r) const
virtual void getColor (IMG_ColorRGB &c) const
virtual void * getDataPtr () const =0
TUns32 getHeight () const
GEN_TUns32 getHeight () const
void * getImage () const
void getPixelAddress (float u, float v, TUns32 &x, TUns32 &y) const
void getPixelAddress (float u, float v, GEN_TInt32 &x, GEN_TInt32 &y) const
PixelType getPixelType () const
TPixelType getPixelType () const
virtual float getTransparency () const
TUns32 getWidth () const
GEN_TUns32 getWidth () const
 IMG_BrushRGBA32 (TUns32 w, TUns32 h, const IMG_ColorRGB &c, float a=0.8f)
virtual void setColor (const IMG_ColorRGB &c)
virtual void setPixmap (TUns32 x, TUns32 y, const IMG_PixmapRGBA32 &pixmap, const IMG_Rect &bnds)
virtual void setPixmap (TUns32 x, TUns32 y, const IMG_PixmapRGBA32 &pixmap)
virtual void setPixmap (const IMG_PixmapRGBA32 &src, const GEN_Rect &srcBnds, const GEN_Rect &destBnds)
virtual void setRadii (TUns32 &rI, TUns32 &rO) const
virtual void setRadii (TUns32 rI, TUns32 rO)
virtual void setTransparency (float a)

Public Attributes

IMG_MemPtr< TPixelRGBA32m_mem

Protected Member Functions

void getColor (TPixelRGBA32 p, IMG_ColorRGBA &c) const
TPixelPtr getPixelPtr (TUns32 x, TUns32 y) const
TPixelPtr getPixelPtr (GEN_TUns32 x, GEN_TUns32 y) const
TPixelRGBA32 getPixelValue (const IMG_ColorRGBA &c) const
TPixelRGBA32 getPixelValue (const IMG_ColorRGBA &c) const
virtual void updateImage ()

Protected Attributes

float m_alpha
IMG_ColorRGB m_color
TUns32 m_height
GEN_TUns32 m_height
void * m_image
IMG_MemPtr< TPixelRGBA32m_pixels
TPixelPtr m_pixelsBase
TUns32 m_pixelSize
GEN_TUns32 m_pixelSize
PixelType m_pixelType
TPixelType m_pixelType
TUns32 m_ri
TUns32 m_ro
TUns32 m_rowBytes
GEN_TUns32 m_rowBytes
TUns32 m_width
GEN_TUns32 m_width

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index