15 public override bool IsEmpty() => TriangleIndices.Count == 0;
22 public void Flush(
Matrix matrix,
bool clearAfterFlush =
true) {
34 m_shader.Texture = font.
Texture;
35 m_shader.SamplerState = samplerState;
36 m_shader.Transforms.World[0] = matrix;
37 m_shader.Color = color;
62 if (clearAfterFlush) {
72 int num3 = Math.Min(num2, 196605);
88 if (clearAfterFlush) {
98 for (
int i = start; i < end; i++) {
108 for (
int i = start; i < end; i++) {
109 array[i].
Color *= color;
116 Vector2 vector =
Font.MeasureText(text, start, count, scale, spacing);
117 if ((anchor &
TextAnchor.HorizontalCenter) != 0) {
118 zero.X = (0f - vector.
X) / 2f;
121 zero.X = 0f - vector.
X;
123 if ((anchor &
TextAnchor.VerticalCenter) != 0) {
124 zero.Y = (0f - vector.
Y) / 2f;
127 zero.Y = 0f - vector.
Y;
RasterizerState RasterizerState
DepthStencilState DepthStencilState
void FlushWithCurrentStateAndShader(Shader shader, bool clearAfterFlush=true)
void TransformTrianglesColors(Color color, int start=0, int end=-1)
SamplerState SamplerState
void FlushWithDeviceState(Shader shader, bool clearAfterFlush=true)
void TransformTriangles(Matrix matrix, int start=0, int end=-1)
readonly DynamicArray< int > TriangleIndices
readonly DynamicArray< VertexPositionColorTexture > TriangleVertices
override void Flush(Matrix matrix, Vector4 color, bool clearAfterFlush=true)
Vector2 CalculateTextOffset(string text, int start, int count, TextAnchor anchor, Vector2 scale, Vector2 spacing)
void FlushWithDeviceState(BitmapFont font, SamplerState samplerState, Matrix matrix, Vector4 color, bool clearAfterFlush=true)
void Flush(Matrix matrix, bool clearAfterFlush=true)
static UnlitShader m_shader
static int Min(int x1, int x2)
static readonly VertexDeclaration VertexDeclaration
static readonly Vector2 Zero
static Vector3 Transform(Vector3 v, Matrix m)
static readonly Vector4 One