libnebular::PictureProps Class Reference
[User API]

Picture data and operations that are independent of file format, but more complex that just container access More...

#include <libnebular.hpp>

Inherits libnebular::PicturePropContainer.

Inherited by libnebular::Picture.

Collaboration diagram for libnebular::PictureProps:
Collaboration graph
[legend]

List of all members.

Classes

class  Impl_

Public Member Functions

 PictureProps ()
 ~PictureProps ()
template<typename T >
void check ()
 Checks properties corresponding to T.
void setDefaults ()
 Sets properties to their defaults.
void checkUnusedOpts ()
 Checks for remaining properties with names prefixed by "opt/": warns and unsets every found.
template<typename T >
void calculate ()
 Calculates values for properties given by template argument.
void reproduce (PictureProps &src)
 Copies (with extended meaning) PictureProps from "src" to "this" with action parameters given in "this" property map.
void prepareReproduceBmInfo (PictureProps &src)
 Determines "bm/data" property size; for usage in conjunction with reproduce().

Detailed Description

Picture data and operations that are independent of file format, but more complex that just container access

Mainly for use in Picture.

See also:
About properties

Definition at line 521 of file libnebular.hpp.


Constructor & Destructor Documentation

libnebular::PictureProps::PictureProps (  ) 

Definition at line 173 of file picture-props.cpp.

Here is the call graph for this function:

libnebular::PictureProps::~PictureProps (  ) 

Definition at line 179 of file picture-props.cpp.


Member Function Documentation

template<typename T >
void libnebular::PictureProps::calculate (  )  [inline]

Calculates values for properties given by template argument.

For where to find template argument for property you need, see Properties.

Currently defined for: PropCalcBmSizeLengthUnits, PropCalcBmPixelMaskMisc, PropCalcBmDataSize, PropCalcBmColorsUsed.

Here is the caller graph for this function:

template<typename T >
void libnebular::PictureProps::check (  )  [inline]

Checks properties corresponding to T.

Really checks and updates dependent values. If check is failed, throws Error. For where to find template argument for property you need, see Properties.

Currently defined for: PropBmInfo, PropBmData, PropBmPixelFormat, PropBmPixelsPerLength, PropBmMiscStorageParams, PropBmMiscDisplayParams. (Concrete implementations of this are made by explicit template specialization.)

Here is the caller graph for this function:

void libnebular::PictureProps::checkUnusedOpts (  ) 

Checks for remaining properties with names prefixed by "opt/": warns and unsets every found.

Definition at line 778 of file picture-props.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void libnebular::PictureProps::prepareReproduceBmInfo ( PictureProps src  ) 

Determines "bm/data" property size; for usage in conjunction with reproduce().

Used for external (user-controlled) "bm/data" Blob memory allocation before reproduce

Definition at line 440 of file picture-props.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void libnebular::PictureProps::reproduce ( PictureProps src  ) 

Copies (with extended meaning) PictureProps from "src" to "this" with action parameters given in "this" property map.

How to implement loading of bitmap to user-specified memory area? So, (1) use prepareReproduceBmInfo() to determine needed memory size; (2) allocate memory as you want; (3) attach allocated memory to Blob by Blob::attach; (4) set this Blob as "bm/data" value before usage of reproduce

Design note:
About conversions available in Picture::reproduce()
  • Why conversions wasn't in SRS but i still need it? Maybe, some tests are wrong (~_^)

  • Flip is needed: "In Windows 95 ⟨...⟩ There also can be "top-down" and "bottom-up" BMP-s."

  • Rotation for right angle is available by flips and transpose

  • Also there is "future-planning" support for grayscale and palettized formats; "future-planning" support for up-to-48-bit pixels

  • Quote form conversation with client:
    
    		Хотелось бы чтоб пользователь имел возможность определять преобразование, как будет храниться битовая маска: RGB565, BGR888 и т.д.,т.е. задавал формат указывая:
    
    		1. Количесто бит на биксель
    
    		2. Количество бит на канал
    		4. Последовательность каналов.
    
    		

Design note:
Yes, here we can call prepareReproduceBmInfo() second time - but how otherwise provide picture validity before reproduce()?
Note:
Here is sharing of "bm/data"

Coverts pixels in different formats

Containse some precomputed data that aids the process

Bit-shift left

Negative amount is shift to other side

Definition at line 531 of file picture-props.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void libnebular::PictureProps::setDefaults (  ) 

Sets properties to their defaults.

Note:
These doesn't having defaults aren't unset

Definition at line 181 of file picture-props.cpp.

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Sun May 29 18:23:57 2011 for libnebular by  doxygen 1.6.3