krita

KisChannelInfo Class Reference

#include <kis_channelinfo.h>

Inherits KShared.

List of all members.


Detailed Description

This class gives some basic information about a channel, that is, one of the components that makes up a particular pixel.

Definition at line 30 of file kis_channelinfo.h.


Public Types

enum  enumChannelType { COLOR, ALPHA, SUBSTANCE, SUBSTRATE }
enum  enumChannelValueType {
  UINT8, UINT16, FLOAT16, FLOAT32,
  INT8, INT16, OTHER
}
enum  enumChannelFlags {
  FLAG_COLOR = 1, FLAG_ALPHA = (1 << 1), FLAG_SUBSTANCE = (1 << 2), FLAG_SUBSTRATE = (1 << 3),
  FLAG_COLOR_AND_ALPHA = FLAG_ALPHA | FLAG_COLOR
}

Public Member Functions

 KisChannelInfo (const QString &name, const QString &abbrev, Q_INT32 npos, enumChannelType channelType, enumChannelValueType channelValueType, Q_INT32 size=1, QColor color=QColor(0, 0, 0))
QString name () const
QString abbrev () const
Q_INT32 pos () const
Q_INT32 size () const
enumChannelType channelType () const
enumChannelValueType channelValueType () const
QColor color () const

Constructor & Destructor Documentation

KisChannelInfo::KisChannelInfo ( const QString &  name,
const QString &  abbrev,
Q_INT32  npos,
enumChannelType  channelType,
enumChannelValueType  channelValueType,
Q_INT32  size = 1,
QColor  color = QColor(0,0,0) 
) [inline]

Parameters:
name The i18n'ed name of this channel ("Red")
abbrev A one or two letter abbreviation of the name of this channel ("R")
npos the position of the first byte of this channel value in the pixel
channelType the type of this channel (color, alpha, etc)
channelValueType the datatype of this channel
size the size in bytes of this channel
color a color to visually represent this channel by in the gui

Definition at line 67 of file kis_channelinfo.h.


Member Function Documentation

QString KisChannelInfo::name (  )  const [inline]

User-friendly name for this channel for presentation purposes in the gui.

Definition at line 73 of file kis_channelinfo.h.

QString KisChannelInfo::abbrev (  )  const [inline]

Return the single-letter abbreviation for this channel.

Definition at line 78 of file kis_channelinfo.h.

Q_INT32 KisChannelInfo::pos (  )  const [inline]

returns the position of the first byte of the channel in the pixel

Definition at line 82 of file kis_channelinfo.h.

Q_INT32 KisChannelInfo::size (  )  const [inline]

returns the number of bytes this channel takes

Definition at line 87 of file kis_channelinfo.h.

enumChannelType KisChannelInfo::channelType (  )  const [inline]

returns the type of the channel

Definition at line 92 of file kis_channelinfo.h.

enumChannelValueType KisChannelInfo::channelValueType (  )  const [inline]

return the type of the value of the channel (float, uint8 or uint16)

Definition at line 96 of file kis_channelinfo.h.

QColor KisChannelInfo::color (  )  const [inline]

This is a color that can be used to represent this channel in histograms and so.

By default this is black, so keep in mind that many channels might look the same

Definition at line 101 of file kis_channelinfo.h.


The documentation for this class was generated from the following file:
KDE Home | KDE Accessibility Home | Description of Access Keys