public static ImageInterpolation ToEto(this sd.BitmapInterpolationMode value) { switch (value) { case sd.BitmapInterpolationMode.Linear: return(ImageInterpolation.High); case sd.BitmapInterpolationMode.NearestNeighbor: return(ImageInterpolation.None); default: throw new NotSupportedException(); } }
public void DrawBitmap(string bitmapName, RawRectangleF bounds, float opacity = 1f, Direct2DBitmapInterpolationMode interpolationMode = Direct2DBitmapInterpolationMode.Linear) { _renderTarget.DrawBitmap(_bitmaps[bitmapName], bounds, opacity, interpolationMode); }
public static void DrawBitmap(this RenderTarget renderTarget, SharpDX.Direct2D1.Bitmap bitmap, RawVector2 pos, Size2F?size, float opacity = 1f, SharpDX.Direct2D1.BitmapInterpolationMode interpolationMode = 0) { if (!size.HasValue) { size = new Size2F?(bitmap.Size); } renderTarget.DrawBitmap(bitmap, new RawRectangleF(pos.X, pos.Y, pos.X + size.Value.Width, pos.Y + size.Value.Height), opacity, interpolationMode); }
public static void DrawBitmap(this RenderTarget target, ResourceLoader loader, string key, RawRectangleF rectangle, float opacity = 1, BitmapInterpolationMode bitmapInterpolationMode = BitmapInterpolationMode.Linear) => target.DrawBitmap(loader.Get <ImageResource>(key).Image, rectangle, opacity, bitmapInterpolationMode);