1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
Halofreak1990 22893b5c47 Fixed errors relating to List class
Added 'ValueTypes' Boolean and Byte
Added System.Collections.Generic.Stack (not used, or tested, but could be useful in final product)
2011-05-02 17:33:24 +00:00

56 lines
1.4 KiB
C++

/********************************************************
* SpriteFont.h *
* *
* XFX SpriteFont definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _XFX_GRAPHICS_SPRITEFONT_
#define _XFX_GRAPHICS_SPRITEFONT_
#include <Rectangle.h>
#include "Texture2D.h"
#include <Vector3.h>
#include <System/Collections/Generic/List.h>
#include <System/Types.h>
using namespace System;
using namespace System::Collections::Generic;
namespace XFX
{
struct Vector2;
namespace Graphics
{
class SpriteBatch;
/// <summary>
/// Represents a font texture.
/// </summary>
class SpriteFont
{
private:
List<char> characterMap;
List<Rectangle> croppingData;
List<Rectangle> glyphData;
List<Vector3> kerning;
int lineSpacing;
float spacing;
Texture2D* textureValue;
int GetIndexForCharacter(char character);
public:
int LineSpacing();
float Spacing;
SpriteFont(Texture2D* texture, List<Rectangle> glyphs, List<Rectangle> cropping, List<char> charMap, int lineSpacing, float spacing, List<Vector3> kerning);
void Draw(char* text, SpriteBatch spriteBatch, Vector2 textblockPosition, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects_t spriteEffects, float depth);
Vector2 MeasureString(char* text);
};
}
}
#endif //_XFX_GRAPHICS_SPRITEFONT_