Logo Search packages:      
Sourcecode: blender version File versions  Download package

ColorBlock Struct Reference

#include <ColorBlock.h>

List of all members.

Detailed Description

Uncompressed 4x4 color 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.

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.

Contributors: Amorilia (amorilia@gamebox.net)


Definition at line 41 of file ColorBlock.h.

Public Member Functions

Color32 averageColor () const
 Get average color of the block.
void boundsRange (Color32 *start, Color32 *end) const
 Get color range based on the bounding box.
void boundsRangeAlpha (Color32 *start, Color32 *end) const
 Get color range based on the bounding box.
Color32color (uint x, uint y)
 Get block color.
Color32 color (uint x, uint y) const
 Get block color.
Color32color (uint i)
 Get block color.
Color32 color (uint i) const
 Get block color.
 ColorBlock (const Image *img, uint x, uint y)
 Initialize this color block.
 ColorBlock (const ColorBlock &block)
 Init the color block with the contents of the given block.
 ColorBlock ()
 Default constructor.
const Color32colors () const
 Get pointer to block colors.
uint countUniqueColors () const
 Count number of unique colors in this color block.
void diameterRange (Color32 *start, Color32 *end) const
 Get diameter color range.
bool hasAlpha () const
 Return true if the block is not fully opaque.
void init (const Image *img, uint x, uint y)
bool isSingleColor () const
 Returns true if the block has a single color.
void luminanceRange (Color32 *start, Color32 *end) const
 Get luminance color range.
void sortColorsByAbsoluteValue ()
 Sort colors by abosolute value in their 16 bit representation.
void splatX ()
void splatY ()
void swizzleDXT5n ()
float volume () const

Private Attributes

Color32 m_color [4 *4]

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

Generated by  Doxygen 1.6.0   Back to index