public inkImageControl(inkImageWidget widget, RDTWidgetView widgetView) : base(widget, widgetView) { if (ImageWidget.UseNineSliceScale) { nsRect = (RectF)Application.Current.TryFindResource("RectF/" + TextureAtlas + "#" + TexturePart); if (nsRect != null) { UsingNineScale = true; Rect = new RED4.Types.Rect() { Left = (int)Math.Round(nsRect.Left), Top = (int)Math.Round(nsRect.Top), Right = (int)Math.Round(nsRect.Right), Bottom = (int)Math.Round(nsRect.Bottom) }; } } TileType = ImageWidget.TileType.Value.GetValueOrDefault(); DrawImage(new Size(Width, Height)); }
public static inkControl CreateControl(this inkWidget widget, RDTWidgetView widgetView) { switch (widget) { case inkCanvasWidget Canvas: return(new inkCanvasControl(Canvas, widgetView)); case inkBasePanelWidget BasePanel: return(new inkBasePanelControl(BasePanel, widgetView)); case inkFlexWidget Flex: return(new inkFlexControl(Flex, widgetView)); case inkGridWidget Grid: return(new inkGridControl(Grid, widgetView)); case inkCompoundWidget Compound: return(new inkCompoundControl(Compound, widgetView)); case inkImageWidget Image: return(new inkImageControl(Image, widgetView)); case inkMaskWidget Mask: return(new inkMaskControl(Mask, widgetView)); case inkTextWidget Text: return(new inkTextControl(Text, widgetView)); case inkRectangleWidget Rectangle: return(new inkRectangleControl(Rectangle, widgetView)); case inkBorderWidget Border: return(new inkBorderControl(Border, widgetView)); default: return(new inkControl(widget, widgetView)); } }
public inkMaskControl(inkMaskWidget widget, RDTWidgetView widgetView) : base(widget, widgetView) { //Opacity = 1.0; DrawImage(new Size(Width, Height)); }
public inkRectangleControl(inkWidget widget, RDTWidgetView widgetView) : base(widget, widgetView) { }
public inkGridControl(inkGridWidget widget, RDTWidgetView widgetView) : base(widget, widgetView) { }
public inkBorderControl(inkBorderWidget widget, RDTWidgetView widgetView) : base(widget, widgetView) { }
public inkBasePanelControl(inkBasePanelWidget widget, RDTWidgetView widgetView) : base(widget, widgetView) { }
public inkFlexControl(inkFlexWidget widget, RDTWidgetView widgetView) : base(widget, widgetView) { }
public inkCanvasControl(inkCanvasWidget widget, RDTWidgetView widgetView) : base(widget, widgetView) { }