VedaLibImage/BubbleGreyImage.h

Go to the documentation of this file.
00001 /*! \file 
00002     \author victorien ferry & www.m4nkind.com
00003     \brief This file applies the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 , read file COPYING.
00004 */
00005 #ifndef COM_M4NKIND_BubbleGreyImage_H
00006 #define COM_M4NKIND_BubbleGreyImage_H
00007 
00008 #include "ProceduralImage.h"
00009 #include "PackULong_Flags.h"
00010 #include "PackObjectReference.h"
00011 /*!
00012     \class  BubbleGreyImage
00013     \ingroup BaseObjectInherited_VedaLibImage BaseObjectInheritedDocGroup
00014     \brief  Class able to build some grey, 2n-pixelSized, bubble Image...
00015 */
00016 
00017 class BubbleGreyImage : public ProceduralImage
00018 {
00019 /*==================================================================
00020                                 PUBLIC
00021 ==================================================================*/
00022 public:
00023     /*!
00024         \brief  Constructor. There should only be members initialisation there.
00025     */
00026     BubbleGreyImage(void);
00027     
00028     /*!
00029         \brief  Class Inheritance Descriptors. Also forces a destructor. See BASEOBJECT_DECLARE_... in .cpp
00030     */
00031     BASEOBJECT_DEFINE_CLASS(BubbleGreyImage);
00032 
00033 
00034 /*==================================================================
00035                                 PROTECTED
00036 ==================================================================*/
00037 protected:
00038     enum {
00039         BUBFLAG_OneColorByRegion=1,
00040         BUBFLAG_Multiply=2
00041     };
00042     //! property flags for modes:
00043     PackULong_Flags     mSer_Flags;
00044     //! reference to a sub-image to use.
00045     PackObjectReference mSer_SubImage;
00046     /*!
00047     \brief  Method that really build the object using the serializable parameters.
00048             Close() should close everything opened by Create().
00049             It uses a 9-neighbour-case-test algorithm to make bubbles.
00050             1 bitmap is used.
00051         \return false if creation failed.
00052 */
00053     virtual bool CreateInternal(void);
00054 
00055     int                 m_RandImageSeed;
00056     int                 FindDistance( int distx, int disty );
00057 
00058     unsigned int        FindShiftX( int distx, int disty );
00059     unsigned int        FindShiftY( int distx, int disty );
00060 
00061 };
00062 
00063 #endif

      /\/\        4         N         k         !         N         D
                      _______  _ __ ___  _____            ___ _ _  ____
     ___________  __//___   /________  |/    / ___________\_______/    \
    /   _   _   \/   _     /    _   /      _/_/____/    _       __     /
   /    /   /       /     /    /    \      \/     /    /    \   \     /
  \\___/___/___/    ¯    _____/_____/       ______\___/_____/\________\\
               \________/_ ___ __ l____\      /elD!  
                 http://www.m4nkind.com \____/