#include <ICursorUtils.h>
|
| enum | { kDefaultIID = IID_ICURSORUTILS } |
| |
| enum | CursorOptions { kDefaultCursor = 0, kShowWidthHeight, kShowXPosition, kShowYPosition, kShowXYPosition, kShowLineLength, kShowScale, kShowRotation, kShowLiveCornerRadius, kShowWidth, kShowHeight, kShowZoomFactor } |
| |
ICursorUtils is a utility class used to create custom bitmap based cursors. Please use the ICursorUtils directly via the UtilsBoss if possible, see Utils.h: i.e. Utils<ICursorUtils>()->DrawStringIntoOffscreen( ... ) ;
| virtual void ICursorUtils::InitCursor | ( | const CursorOptions | option | ) | |
| pure virtual |
Initialize a new custom cursor that shows the current width/height of a sprite.
- Parameters
| option | [IN]: Type of information you want updated and displayed dynamically within the cursor. |
| virtual IGraphicsPort* ICursorUtils::QueryGraphicsPortForBitmap | ( | uchar * | bitmapBuffer, | | | uint32 | bitmapWidth, | | | uint32 | bitmapHeight, | | | bool16 | hasAlpha, | | | bool16 | hiRes | | ) | | const |
| pure virtual |
Utility routine which creates a graphics port around a bitmap, so we can draw to it with AGM
- Parameters
| bitmapBuffer | [IN]: pointer to the bitmap buffer to be used. Buffers length is width * height * 4; |
| bitmapWidth | [IN]: width, in pixels, of the bitmap. |
| bitmapHeight | [IN]: height, in pixels, of the bitmap. |
| hasAlpha | [IN]: on input,the cursor to super-impose. On output, the new custom cursor. |
| hiRes | [IN]: whether the bitmap is at regular 72dpi or high/retina resolution (144dpi), in which case the returned IGraphicsPort will be scaled accordingly. |
- Returns
- pointer to an IGraphicsPort interface can be used to draw into the bitmapped buffer.
| virtual IGraphicsPort* ICursorUtils::QueryGraphicsPortForBitmap | ( | uchar * | bitmapBuffer, | | | uint32 | bitmapWidth, | | | uint32 | bitmapHeight, | | | bool16 | hasAlpha, | | | bool16 | hiRes, | | | float | scaleFactor | | ) | | const |
| pure virtual |
Utility routine which creates a graphics port around a bitmap, so we can draw to it with AGM
- Parameters
| bitmapBuffer | [IN]: pointer to the bitmap buffer to be used. Buffers length is width * height * 4; |
| bitmapWidth | [IN]: width, in pixels, of the bitmap. |
| bitmapHeight | [IN]: height, in pixels, of the bitmap. |
| hasAlpha | [IN]: on input,the cursor to super-impose. On output, the new custom cursor. |
| hiRes | [IN]: whether the bitmap is at regular 72dpi or high/retina resolution (144dpi), in which case the returned IGraphicsPort will be scaled by passed scaleFactor. |
- Returns
- pointer to an IGraphicsPort interface can be used to draw into the bitmapped buffer.
| virtual void ICursorUtils::ReleaseCursor | ( | | ) | |
| pure virtual |
Release any interfaces held due to calls to InitCursor and/or one of the Update methods.
| virtual void ICursorUtils::UpdateCursor | ( | CursorSpec & | adjustedCursorSpec | ) | const |
| pure virtual |
Create a new custom cursor showing the information specified by InitCursor of a sprite with the provided cursor superimposed on top-left of the new cursor.
- Parameters
| adjustedCursorSpec | [IN/OUT]: on input,the cursor to super-impose. On output, the new custom cursor. |