public Image() : base() { Border = new Border ( 0, new Color(0,0,0) ); BackgroundColor = new Color(0.8,0.8,0.8); ImageKey = String.Empty; }
public Image() : base() { Border = new Border { WidthAll = 0, Color = new Color(0,0,0) }; BackgroundColor = new Color(0.8,0.8,0.8); ImageKey = String.Empty; }
public static void DrawInsideBorder(this Context g,Rectangle r,Border border, bool render) { g.Save (); g.Color = border.Color.ToCairoColor(); g.LineWidth = border.TopWidth; g.LineCap = LineCap.Butt; double newUpperY = (r.Y + border.TopWidth / 2); g.MoveTo (r.X, newUpperY); g.LineTo (r.X + r.Width, newUpperY); g.Stroke (); g.LineWidth = border.RightWidth; double rightX = r.X + r.Width-border.RightWidth/2; g.MoveTo (rightX, r.Y); g.LineTo (rightX, r.Y + r.Height); g.Stroke (); double bottomY = r.Y + r.Height - border.BottomWidth /2; g.MoveTo(r.X + r.Width, bottomY); g.LineWidth = border.BottomWidth; g.LineTo (r.X,bottomY); g.Stroke (); g.LineWidth = border.LeftWidth; double leftX = r.X + border.LeftWidth /2; g.MoveTo(leftX, r.Y + r.Height); g.LineTo (leftX, r.Y); if(render) g.Stroke (); g.Restore (); }
void OnChanged(object o, EventArgs a) { string s = entry.Text; try { if(s != null) { var doubles = s.Split(';'); if (doubles.Length > 3) { border = new Border( UnitExtensions.FromString(doubles[0]), UnitExtensions.FromString(doubles[1]), UnitExtensions.FromString(doubles[2]), UnitExtensions.FromString(doubles[3])); } else if (doubles.Length == 1) { border = new Border( UnitExtensions.FromString(doubles[0])); } } if (ValueChanged != null) ValueChanged (this, a); } catch { } }
public object Clone() { Border b = new Border(); b.LeftWidth = LeftWidth; b.RightWidth = RightWidth; b.TopWidth = TopWidth; b.BottomWidth = BottomWidth; b.Color = new Color(Color.R,Color.G,Color.B,Color.A); return b; }
public static void DrawInsideSelectorInUnits(this Context g,Rectangle r,Border border, double w) { DrawInsideSelector(g, new Rectangle(r.X * UnitMultiplier,r.Y * UnitMultiplier,r.Width * UnitMultiplier,r.Height * UnitMultiplier), border, w); }
public static void DrawInsideBorderInUnit(this Context g,Rectangle r,Border b, bool render) { DrawInsideBorder(g,new Rectangle(r.X * UnitMultiplier, r.Y* UnitMultiplier, r.Width* UnitMultiplier, r.Height* UnitMultiplier),b, render); }
public RectTool(DesignService designService) : base(designService) { selectBorder = new Border (1); }