public static Image ( |
||
userTextureID | ||
size | Vector2 | |
uv0 | Vector2 | |
uv1 | Vector2 | |
tintColor | Vector4 | |
borderColor | Vector4 | |
Результат | void |
public static void Image(Texture texture, Vector2f size, Color tintColor, Color borderColor) { var textureId = ConvertGlTextureHandleToImTextureId(texture.NativeHandle); ImGui.Image(textureId, new Vector2(size.X, size.Y), new Vector2(0, 0), new Vector2(1, 1), ToImColor(tintColor).Value, ToImColor(borderColor).Value); }
public static void Image(Sprite sprite, Vector2f size, Color tintColor, Color borderColor) { var texture = sprite.Texture; // sprite without texture cannot be drawn if (texture is null) { return; } var textureSize = (Vector2f)texture.Size; var textureRect = sprite.TextureRect; var uv0 = new Vector2(textureRect.Left / textureSize.X, textureRect.Top / textureSize.Y); var uv1 = new Vector2((textureRect.Left + textureRect.Width) / textureSize.X, (textureRect.Top + textureRect.Height) / textureSize.Y); var textureId = ConvertGlTextureHandleToImTextureId(texture.NativeHandle); ImGui.Image(textureId, new Vector2(size.X, size.Y), uv0, uv1, ToImColor(tintColor).Value, ToImColor(borderColor).Value); }
public static unsafe void Image(Sprite sprite, Vector2 size) { SpriteInfo info = GetSpriteInfo(sprite); ImGui.Image((IntPtr)GetTextureId(info.texture), *(NumericsV2f *)&size, info.uv0, info.uv1); }
public static void Image(Sprite sprite) { SpriteInfo info = GetSpriteInfo(sprite); ImGui.Image((IntPtr)GetTextureId(info.texture), info.size, info.uv0, info.uv1); }
public static unsafe void Image(Texture tex, Vector2 size) { ImGui.Image((IntPtr)GetTextureId(tex), *(NumericsV2f *)&size); }
public static void Image(Texture tex) { ImGui.Image((IntPtr)GetTextureId(tex), new NumericsV2f(tex.width, tex.height)); }
public static void Image(Texture tex, Vector2 size) { ImGui.Image((IntPtr)GetTextureId(tex), size); }
public static void Image(Texture tex) { ImGui.Image((IntPtr)GetTextureId(tex), new Vector2(tex.width, tex.height)); }