/// <summary> /// Initialize new instance of <see cref="ToolImageSelection"/> class. /// </summary> /// <param name="serviceProvider">The service provider.</param> /// <param name="layer">The selection shapes layer.</param> /// <param name="shape">The selected shape.</param> /// <param name="style">The selection shapes style.</param> public ToolImageSelection(IServiceProvider serviceProvider, ILayerContainer layer, IImageShape shape, IShapeStyle style) { _serviceProvider = serviceProvider; _layer = layer; _image = shape; _style = style; }
public ImageDrawNode(IImageShape image, IShapeStyle style, IImageCache imageCache, ICache <string, IDisposable> bitmapCache) : base() { Style = style; Image = image; Text = image; ImageCache = imageCache; BitmapCache = bitmapCache; UpdateGeometry(); }
public static SKPath ToSKPath(this IBaseShape shape, double dx, double dy, Func <double, float> scale) { return(shape switch { ILineShape lineShape => ToSKPath(lineShape, dx, dy, scale), IRectangleShape rectangleShape => ToSKPath(rectangleShape, dx, dy, scale), IEllipseShape ellipseShape => ToSKPath(ellipseShape, dx, dy, scale), IImageShape imageShape => ToSKPath(imageShape, dx, dy, scale), IArcShape arcShape => ToSKPath(arcShape, dx, dy, scale), ICubicBezierShape cubicBezierShape => ToSKPath(cubicBezierShape, dx, dy, scale), IQuadraticBezierShape quadraticBezierShape => ToSKPath(quadraticBezierShape, dx, dy, scale), ITextShape textShape => ToSKPath(textShape, dx, dy, scale), IPathShape pathShape => ToSKPath(pathShape, dx, dy, scale), IGroupShape groupShape => ToSKPath(groupShape.Shapes, dx, dy, scale), _ => null, });
/// <inheritdoc/> public void Bind(IImageShape image, object db, object r) { }
public IImageDrawNode CreateImageDrawNode(IImageShape image, IShapeStyle style, IImageCache imageCache, ICache <string, IDisposable> bitmapCache) { return(new ImageDrawNode(image, style, imageCache, bitmapCache)); }