bitmaps.h File Reference

Go to the source code of this file.

Classes

struct   mbm_window

Defines

#define  is_bitmap(v)   ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(MAXBitMap))
#define  BM_SAVED   0x0001
#define  BM_READONLY   0x0002
#define  BM_FILEBACKED   0x0004
#define  MT_GIZMO_SELECTED   0x0001
#define  MT_GIZMO_MOVED   0x0002
#define  MT_ENABLED   0x0004
#define  MT_MATCH_RGB   0
#define  MT_MATCH_GRAY   1
#define  MT_MATCH_EDGE   2
#define  MT_MATCH_RANK   3
#define  MT_NO_HANDLE   0
#define  MT_CENTER   1
#define  MT_TOPLEFT_BOUNDS   2
#define  MT_BOTLEFT_BOUNDS   3
#define  MT_TOPRIGHT_BOUNDS   4
#define  MT_BOTRIGHT_BOUNDS   5
#define  MT_TOPLEFT_MBOUNDS   6
#define  MT_BOTLEFT_MBOUNDS   7
#define  MT_TOPRIGHT_MBOUNDS   8
#define  MT_BOTRIGHT_MBOUNDS   9

Functions

  applyable_class (MAXBitMap) class MAXBitMap
  applyable_class (MotionTracker) class MotionTracker

Define Documentation

#define is_bitmap (   v )    ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(MAXBitMap))
#define BM_SAVED   0x0001

Definition at line 84 of file bitmaps.h.

#define BM_READONLY   0x0002

Definition at line 85 of file bitmaps.h.

#define BM_FILEBACKED   0x0004

Definition at line 86 of file bitmaps.h.

#define MT_GIZMO_SELECTED   0x0001

Definition at line 142 of file bitmaps.h.

#define MT_GIZMO_MOVED   0x0002

Definition at line 143 of file bitmaps.h.

#define MT_ENABLED   0x0004

Definition at line 144 of file bitmaps.h.

#define MT_MATCH_RGB   0

Definition at line 146 of file bitmaps.h.

#define MT_MATCH_GRAY   1

Definition at line 147 of file bitmaps.h.

#define MT_MATCH_EDGE   2

Definition at line 148 of file bitmaps.h.

#define MT_MATCH_RANK   3

Definition at line 149 of file bitmaps.h.

#define MT_NO_HANDLE   0

Definition at line 151 of file bitmaps.h.

#define MT_CENTER   1

Definition at line 152 of file bitmaps.h.

#define MT_TOPLEFT_BOUNDS   2

Definition at line 153 of file bitmaps.h.

#define MT_BOTLEFT_BOUNDS   3

Definition at line 154 of file bitmaps.h.

#define MT_TOPRIGHT_BOUNDS   4

Definition at line 155 of file bitmaps.h.

#define MT_BOTRIGHT_BOUNDS   5

Definition at line 156 of file bitmaps.h.

#define MT_TOPLEFT_MBOUNDS   6

Definition at line 157 of file bitmaps.h.

#define MT_BOTLEFT_MBOUNDS   7

Definition at line 158 of file bitmaps.h.

#define MT_TOPRIGHT_MBOUNDS   8

Definition at line 159 of file bitmaps.h.

#define MT_BOTRIGHT_MBOUNDS   9

Definition at line 160 of file bitmaps.h.


Function Documentation

applyable_class ( MAXBitMap  )

Define an equal operator (i.e. '==') for maxscript visible values.

Define a NOT equal operator (i.e. '!=') for maxscript visible values.

Definition at line 26 of file bitmaps.h.

                : public Value
{
public:
    BitmapInfo            bi;                   // our BitMapInfo 
    Bitmap*               bm;                   // the actual bitmap
    Tab<MotionTracker*>   trackers;             // any motion trackers
    MotionTracker*        dragger;              // tracker currently under drag
    WNDPROC               main_window_proc;     // original display window proc if ours installed
    GBuffer*              gb;                   // GBuffer if non-NULL
    GBufReader*           gbr;                  // current GBuffer reader if non-NULL
    short                 flags;    

    static Tab<mbm_window> windows;             // table of MAXBitMap windows currently open

    ScripterExport MAXBitMap();
    ScripterExport MAXBitMap(BitmapInfo bi, Bitmap* bm);
               ~MAXBitMap();

    static void setup();
    static MAXBitMap* find_window_mbm(HWND hwnd);

                classof_methods (MAXBitMap, Value);
#   define      is_bitmap(v) ((DbgVerify(!is_sourcepositionwrapper(v)), (v))->tag == class_tag(MAXBitMap))
    void        collect() { delete this; }
    void        gc_trace();
    ScripterExport void sprin1(CharStream* s);

    Value*      new_motionTracker();
    void        install_window_proc();

#include "..\macros\define_implementations.h"
    def_visible_generic ( display,          "display"); 
    def_visible_generic ( unDisplay,        "unDisplay" ); 
    def_visible_generic ( save,             "save" ); 
    def_visible_generic ( gotoFrame,        "gotoFrame"); 
    def_visible_generic ( close,            "close");
    def_visible_generic ( getTracker,       "getTracker" ); 
    def_visible_generic ( deleteTracker,    "deleteTracker" ); 
    use_generic         ( copy,             "copy" ); 
    def_visible_generic ( zoom,             "zoom" ); 
    def_visible_generic ( crop,             "crop" ); 
    def_visible_generic ( setAsBackground,  "setAsBackground" ); 
    def_visible_generic ( getPixels,        "getPixels" ); 
    def_visible_generic ( setPixels,        "setPixels" ); 
    def_visible_generic ( getIndexedPixels, "getIndexedPixels" ); 
    def_visible_generic ( setIndexedPixels, "setIndexedPixels" ); 
    def_visible_generic ( getChannel,       "getChannel" ); 
    def_visible_generic ( getChannelAsMask, "getChannelAsMask" ); 
    use_generic         ( free,             "free");

    Value*      get_property(Value** arg_list, int count);
    Value*      set_property(Value** arg_list, int count);

    ScripterExport void     to_fpvalue(FPValue& v);
};
applyable_class ( MotionTracker  )

Definition at line 90 of file bitmaps.h.

                    : public Value
{
public:
    MAXBitMap*  mbm;            // the bitmap I'm tracking
    int         index;          // which tracker in that bitmap
    int         cur_frame;      // frame I last tracked
    POINT       center;         // current feature center
    RECT        bounds;         // feature bounds relative to center
    RECT        motion_bounds;  // maximum frame-to-frame motion relative to feature center
    POINT       mouse_down_at;  // mouse pos at mousedown
    int         handle_x;       // handle pos at mouse_down..
    int         handle_y;       // handle pos at mouse_down..
    int         handle;         // which handle is dragging
    BYTE*       target;         // current target image as 3 BYTE RGB per pixel
    POINT*      track_cache;    // keeps a cache of tracking coords, one per frame (inval if change gizmo)
    short       compare_mode;   // feature matching space: rgb color, luminence, edge-filtered, etc.
    float       match_distance; // last tracking match 'distance'
    HBITMAP     id_bitmap;      // unbelievable - I need to use a bitmap copy to do XOR text drawing
    short       flags;

                MotionTracker(MAXBitMap* imbm, int iindex);
               ~MotionTracker();

                classof_methods(MotionTracker, Value);
    void        collect() { delete this; }
    ScripterExport void sprin1(CharStream* s);
    void        gc_trace();

    void        track();
    void        clear_track_cache();
    void        set_center(int x, int y);
    void        set_index(int i);
    void        copy_target();
    void        draw(HWND hWnd);
    void        draw_gizmo(HDC hdc);
    void        inval_gizmo();
    BOOL        start_drag(HWND hwnd, int wParam, long lParam);
    void        drag(HWND hwnd, int wParam, long lParam);
    void        end_drag(HWND hwnd);
    void        move(HWND hwnd, int dx, int dy);
    void        deselect(HWND hwnd);

    def_visible_generic ( resample,    "resample");
    def_visible_generic ( reset,       "reset");

    def_property ( center );
    Value*      get_property(Value** arg_list, int count);
    Value*      set_property(Value** arg_list, int count);
};