AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzBitmapSprite9.h
Go to the documentation of this file.
00001 // 
00002 //
00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine
00004 //
00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk
00006 //
00007 // For updates, tutorials and more details check out www.appeasymobile.com
00008 //
00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin.
00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support
00011 //
00012 //
00013 
00014 #if !defined(_CCZ_BITMAP_SPRITE9_H_)
00015 #define _CCZ_BITMAP_SPRITE9_H_
00016 
00017 #include "CzBitmapSprite.h"
00018 
00019 //
00020 //
00021 //
00022 // CzBitmapSprite0 - A BitmapSprite9 is a bitmapped visual representation of an on screen game object that uses patch-9 rendering
00023 //
00024 //
00025 //
00026 class CzBitmapSprite9 : public CzBitmapSprite
00027 {
00028 public:
00029     static uint16       Sprite9Indices[36];
00030     static uint16       Sprite9ClipIndices[4];
00031 
00032     // Properties
00033 protected:
00034 public:
00035     // Properties End
00036 
00037 protected:
00038     void                RebuildUVList();
00039     void                TransformVertices();
00040 
00041 
00042 public:
00043     CzBitmapSprite9() : CzBitmapSprite()    { setSpriteType(ST_9Patch); }
00044     virtual ~CzBitmapSprite9() {}
00045     
00046     void    Init(int vertex_count = 16);
00047 
00048     virtual bool    isClipped();
00049     bool    HitTest(float x, float y);
00050     bool    HitTestNoClip(float x, float y);
00051 
00052     bool    isOutsideFocusRange(float x, float y, float scale = 1.0f);
00053     void    Draw();
00054 
00055     bool    SimpleTestOverlap(CzSprite* other);
00056     bool    TestOverlap(CzSprite* other, int i1, int i2, int i3);
00057     bool    TestOverlap(CzSprite* other);
00058 
00059 };
00060 
00061 
00062 
00063 
00064 
00065 #endif // _CCZ_BITMAP_SPRITE9_H_