コード例 #1
0
        public static void DrawText(Font font, MaterialBase customMaterial, string text, Rectangle layoutRect, Color color, TextAlignment horizontalAlignment = TextAlignment.Near, TextAlignment verticalAlignment = TextAlignment.Near, TextWrapping textWrapping = TextWrapping.NoWrap, float baseLinesGapScale = 1.0f, float scale = 1.0f)
        {
#if UNIT_TEST_COMPILANT
            throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set.");
#else
            TextLayoutOptions layout;
            layout.Bounds = layoutRect;
            layout.HorizontalAlignment = horizontalAlignment;
            layout.VerticalAlignment = verticalAlignment;
            layout.TextWrapping = textWrapping;
            layout.Scale = scale;
            layout.BaseLinesGapScale = baseLinesGapScale;
            Internal_DrawText2(Object.GetUnmanagedPtr(font), Object.GetUnmanagedPtr(customMaterial), text, ref color, ref layout);
#endif
        }
コード例 #2
0
 internal static extern void Internal_DrawSpritePoint(IntPtr atlas, int index, ref Rectangle rect, ref Color color);