// Copyright (c) The Perspex Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. using System.IO; using Perspex.Media; namespace Perspex.Platform { /// /// Defines the main platform-specific interface for the rendering subsystem. /// public interface IPlatformRenderInterface { /// /// Creates a bitmap implementation. /// /// The width of the bitmap. /// The height of the bitmap. /// An . IBitmapImpl CreateBitmap(int width, int height); /// /// Creates a formatted text implementation. /// /// The text. /// The font family. /// The font size. /// The font style. /// The text alignment. /// The font weight. /// An . IFormattedTextImpl CreateFormattedText( string text, string fontFamilyName, double fontSize, FontStyle fontStyle, TextAlignment textAlignment, FontWeight fontWeight); /// /// Creates a stream geometry implementation. /// /// An . IStreamGeometryImpl CreateStreamGeometry(); /// /// Creates a renderer. /// /// The platform handle for the renderer. /// The initial width of the render. /// The initial height of the render. /// An . IRenderer CreateRenderer(IPlatformHandle handle, double width, double height); /// /// Creates a render target bitmap implementation. /// /// The width of the bitmap. /// The height of the bitmap. /// An . IRenderTargetBitmapImpl CreateRenderTargetBitmap(int width, int height); /// /// Loads a bitmap implementation from a file.. /// /// The filename of the bitmap. /// An . IBitmapImpl LoadBitmap(string fileName); /// /// Loads a bitmap implementation from a file.. /// /// The stream to read the bitmap from. /// An . IBitmapImpl LoadBitmap(Stream stream); } }