/// <summary> /// Get image to be used if HTML image load failed. /// </summary> public RImage GetLoadingFailedImage() { if (_errorImage == null) { var stream = typeof(HtmlRendererUtils).Assembly.GetManifestResourceStream("TheArtOfDev.HtmlRenderer.Core.Utils.ImageError.png"); if (stream != null) { _errorImage = ImageFromStream(stream); } } return(_errorImage); }
/// <summary> /// Save the given image to file by showing save dialog to the client. /// </summary> /// <param name="image">the image to save</param> /// <param name="name">the name of the image for save dialog</param> /// <param name="extension">the extension of the image for save dialog</param> /// <param name="control">optional: the control to show the dialog on</param> protected virtual void SaveToFileInt(RImage image, string name, string extension, RControl control = null) { throw new NotImplementedException(); }
/// <summary> /// Set the given image to clipboard. /// </summary> /// <param name="image"></param> protected virtual void SetToClipboardInt(RImage image) { throw new NotImplementedException(); }
/// <summary> /// Save the given image to file by showing save dialog to the client.<br/> /// Not relevant for platforms that don't render HTML on UI element. /// </summary> /// <param name="image">the image to save</param> /// <param name="name">the name of the image for save dialog</param> /// <param name="extension">the extension of the image for save dialog</param> /// <param name="control">optional: the control to show the dialog on</param> public void SaveToFile(RImage image, string name, string extension, RControl control = null) { SaveToFileInt(image, name, extension, control); }
/// <summary> /// Set the given image to clipboard.<br/> /// Not relevant for platforms that don't render HTML on UI element. /// </summary> /// <param name="image">the image object to set to clipboard</param> public void SetToClipboard(RImage image) { SetToClipboardInt(image); }
/// <summary> /// Draws the specified Image at the specified location and with the specified size. /// </summary> /// <param name="image">Image to draw. </param> /// <param name="destRect">Rectangle structure that specifies the location and size of the drawn image. </param> public abstract void DrawImage(RImage image, RRect destRect);
/// <summary> /// Get TextureBrush object that uses the specified image and bounding rectangle. /// </summary> /// <param name="image">The Image object with which this TextureBrush object fills interiors.</param> /// <param name="dstRect">A Rectangle structure that represents the bounding rectangle for this TextureBrush object.</param> /// <param name="translateTransformLocation">The dimension by which to translate the transformation</param> public abstract RBrush GetTextureBrush(RImage image, RRect dstRect, RPoint translateTransformLocation);