libnebular::Picture Class Reference
[User API]

Patch for documentation generator malfunction. More...

#include <libnebular.hpp>

Inherits libnebular::PictureProps.

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

List of all members.

Classes

class  Impl_

Public Member Functions

bool haveHandler () const
 Whether have any PictureHandler attached.
void readFileInfo ()
 Reads file and bitmap information from file.
void readBm ()
 Reads bitmap from file.
void write ()
 Writes to file.
 ~Picture ()
 Picture ()
 Picture (const String &newUrl)
attachHandlerGroup

aHandler plugin attachment routines.

Plugins are questioned in order they registered, and first that tells that it can handle specific file, becomes the handler plugin aHandler.

Note:
When attachment fails, Error is thrown.
void attachHandlerByFileExt ()
 By URL ("opt/file/url") file extension.
void attachHandlerByContentMagic ()
 By file ("opt/file/url") content "magic".
void attachHandlerForWrite ()
 By "mimetype" ("opt/file/mimetype").
void attachHandlerSomehow ()
 By "some" method.
void makeHandlerSomehowAttached ()
 By "some" method if haven't been already attached.

Detailed Description

Patch for documentation generator malfunction.

Basic working picture class. The one intended to be widely used by end user.

Compared with its parent PictureProps, adds file-related functionality. Objects of Picture haven't been required to be associated with some file or URL (in that case they are used nearly same as PictureProps).

Parameters for many operations are being read from property map.

Design note:
I suppose that number of plugins will be really low (up to 5-10) (E.g. ⟨XnView⟩ monster program have ≃0.5k supported file formats.). (But mentioned number won't have exact bounding value.)
Design note:
File type determination is done with already created Picture object because: "If there's need to bring this library to higher scale", author would need to store some assisting data between attempts of file type detection by distinct plugins: e.g. open file class when using "file signature", "magic"; "extension" cut from URL when using extensions.
Design note:
Use already open file resource to help plugins to determine type or give only URL to plugin? Or check file signatures centrally with some kind of theirs database? Check file extensions centrally or pass extension to plugins instead of passing URL-s to plugins? No, today's library is for several - not many - plugins ("small-scale"). It would be easier to redirect all such work to plugins.
See also:
About properties

Definition at line 648 of file libnebular.hpp.


Constructor & Destructor Documentation

libnebular::Picture::~Picture (  ) 

Definition at line 313 of file libnebular.cpp.

libnebular::Picture::Picture (  ) 

Definition at line 314 of file libnebular.cpp.

libnebular::Picture::Picture ( const String newUrl  ) 

Definition at line 318 of file libnebular.cpp.


Member Function Documentation

void libnebular::Picture::attachHandlerByContentMagic (  ) 

By file ("opt/file/url") content "magic".

Definition at line 250 of file libnebular.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void libnebular::Picture::attachHandlerByFileExt (  ) 

By URL ("opt/file/url") file extension.

Definition at line 246 of file libnebular.cpp.

Here is the call graph for this function:

void libnebular::Picture::attachHandlerForWrite (  ) 

By "mimetype" ("opt/file/mimetype").

Definition at line 253 of file libnebular.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void libnebular::Picture::attachHandlerSomehow (  ) 

By "some" method.

Definition at line 257 of file libnebular.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool libnebular::Picture::haveHandler (  )  const

Whether have any PictureHandler attached.

Definition at line 237 of file libnebular.cpp.

Here is the caller graph for this function:

void libnebular::Picture::makeHandlerSomehowAttached (  ) 

By "some" method if haven't been already attached.

Definition at line 260 of file libnebular.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void libnebular::Picture::readBm (  ) 

Reads bitmap from file.

Design note:
Bitmap is stored entirely in memory before we can do some manipulations with it (sometimes that can be heavy - but the author won't optimize this now).

Definition at line 284 of file libnebular.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void libnebular::Picture::readFileInfo (  ) 

Reads file and bitmap information from file.

Bitmap data ("bm/data") doesn't have been read.

Definition at line 268 of file libnebular.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void libnebular::Picture::write (  ) 

Writes to file.

If plugin doesn't accept given "pixel format", it converts it to some acceptable (by Picture::reproduce())

Definition at line 299 of file libnebular.cpp.

Here is the call graph for this function:

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:56 2011 for libnebular by  doxygen 1.6.3