/* Copyright (c) 2022 Alex Diener This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Alex Diener alex@ludobloom.com */ #ifndef __UIDrawingInterface2DTexture_H__ #define __UIDrawingInterface2DTexture_H__ #ifdef __cplusplus extern "C" { #endif typedef struct UIDrawingInterface2DTexture UIDrawingInterface2DTexture; #define UIDrawingInterface2DTexture_superclass UIDrawingInterface #include "uitoolkit/UIDrawingInterface.h" #define UIDrawingInterface2DTexture_ivars \ UIDrawingInterface_ivars #define UIDrawingInterface2DTexture_vtable(self_type) \ UIDrawingInterface_vtable(self_type) stemobject_declare(UIDrawingInterface2DTexture) // Use for vertex formats compatible with p2f_t2f_c4f UIDrawingInterface2DTexture * UIDrawingInterface2DTexture_create(void); bool UIDrawingInterface2DTexture_init(UIDrawingInterface2DTexture * self); void UIDrawingInterface2DTexture_dispose(UIDrawingInterface2DTexture * self); void UIDrawingInterface2DTexture_drawQuad(UIDrawingInterface2DTexture * self, Rect4f vertexBounds, Rect4f textureBounds, Color4f color, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawQuadWithTransform(UIDrawingInterface2DTexture * self, Rect4f vertexBounds, Rect4f textureBounds, quadTransformBits transformBits, Color4f color, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawQuadWithSeparateColors(UIDrawingInterface2DTexture * self, Rect4f vertexBounds, Rect4f textureBounds, Color4f colorBottomLeft, Color4f colorBottomRight, Color4f colorTopLeft, Color4f colorTopRight, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawSlicedQuad3x3(UIDrawingInterface2DTexture * self, Rect4f vertexBounds, Rect4f textureBounds, UISliceGrid3x3 slices, Color4f color, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawSlicedQuad3x1(UIDrawingInterface2DTexture * self, Rect4f vertexBounds, Rect4f textureBounds, UISliceGrid3x1 slices, Color4f color, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawSlicedQuad1x3(UIDrawingInterface2DTexture * self, Rect4f vertexBounds, Rect4f textureBounds, UISliceGrid1x3 slices, Color4f color, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawSlicedQuad3x3WithAlternatingRowColors(UIDrawingInterface2DTexture * self, Rect4f vertexBounds, Rect4f textureBounds, UISliceGrid3x3 slices, float inset, float rowHeight, Color4f evenColor, Color4f oddColor, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawIndexedVertices_p2f_t2f_c4f(UIDrawingInterface2DTexture * self, unsigned int vertexCount, const struct vertex_p2f_t2f_c4f * vertices, unsigned int indexCount, const uint32_t * indexes, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawString(UIDrawingInterface2DTexture * self, compat_type(UITypeface *) typeface, String string, Vector2f offset, Vector2f relativeOrigin, float textScale, Color4f color, VertexIO * vertexIO); void UIDrawingInterface2DTexture_drawTextLayout(UIDrawingInterface2DTexture * self, compat_type(UITextLayout *) textLayout, Vector2f offset, Vector2f relativeOrigin, float textScale, Color4f color, VertexIO * vertexIO); #ifdef __cplusplus } #endif #endif