public override void OnPaint(CellDrawingContext dc) { dc.Graphics.FillRectangle(Bounds, new SolidColor(alpha, SolidColor.Orange)); // コアの描画メソッドを呼び出してセルテキストを出力 dc.DrawCellText(); }
public override void OnPaint(CellDrawingContext dc) { dc.Graphics.FillRectangle(Bounds, new SolidColor(alpha, SolidColor.Orange)); // call core text draw dc.DrawCellText(); }
public override void OnPaint(CellDrawingContext dc) { lock (this.Gif) dc.Graphics.DrawImage(Gif, Bounds); // コアの描画メソッドを呼び出してセルテキストを出力 dc.DrawCellText(); }
public override void OnPaint(CellDrawingContext dc) { lock (this.Gif) dc.Graphics.DrawImage(Gif, Bounds); // call core text draw dc.DrawCellText(); }
public override void OnPaint(CellDrawingContext dc) { dc.Graphics.FillRectangle(new Rectangle(offset, 0, ThumbSize, Bounds.Height), SolidColor.SkyBlue); // call core text draw dc.DrawCellText(); }
public override void OnPaint(CellDrawingContext dc) { // 長方形を描画 dc.Graphics.FillRectangle(new Rectangle(offset, 0, ThumbSize, Bounds.Height), SolidColor.SkyBlue); // コアの描画メソッドを呼び出してセルテキストを出力 dc.DrawCellText(); }
/// <summary> /// Paint this cell body. /// </summary> /// <param name="dc">ReoGrid common drawing context</param> public override void OnPaint(CellDrawingContext dc) { if (this.Cell != null) { DrawButton(dc); // get style //var style = this.Cell.InnerStyle; //var textColor = style.TextColor; } // call core text drawing method dc.DrawCellText(); }
/// <summary> /// Render the image cell body. /// </summary> /// <param name="dc">Platform no-associated drawing context instance.</param> public override void OnPaint(CellDrawingContext dc) { if (Image != null) { RGFloat x = Bounds.X, y = Bounds.Y, width = 0, height = 0; bool needClip = false; switch (this.viewMode) { default: case ImageCellViewMode.Stretch: width = Bounds.Width; height = Bounds.Height; break; case ImageCellViewMode.Zoom: RGFloat widthRatio = (RGFloat)Bounds.Width / Image.Width; RGFloat heightRatio = (RGFloat)Bounds.Height / Image.Height; RGFloat minRatio = Math.Min(widthRatio, heightRatio); width = minRatio * Image.Width; height = minRatio * Image.Height; break; case ImageCellViewMode.Clip: width = Image.Width; height = Image.Height; if (width > Bounds.Width || height > Bounds.Height) { needClip = true; } break; } switch (Cell.Style.HAlign) { default: case ReoGridHorAlign.Left: x = Bounds.X; break; case ReoGridHorAlign.Center: x = (Bounds.Width - width) / 2; break; case ReoGridHorAlign.Right: x = Bounds.Width - width; break; } switch (Cell.Style.VAlign) { default: case ReoGridVerAlign.Top: y = Bounds.Y; break; case ReoGridVerAlign.Middle: y = (Bounds.Height - height) / 2; break; case ReoGridVerAlign.Bottom: y = Bounds.Height - height; break; } var g = dc.Graphics; if (needClip) { g.PushClip(Bounds); } g.DrawImage(Image, x, y, width, height); if (needClip) { g.PopClip(); } } dc.DrawCellText(); }
/// <summary> /// Render the negative progress cell body. /// </summary> /// <param name="dc"></param> public override void OnPaint(CellDrawingContext dc) { double value = this.Cell.GetData <double>(); if (LimitedInsideCell) { if (value > 1) { value = 1; } else if (value < -1) { value = -1; } } var g = dc.Graphics; Rectangle rect; if (value >= 0) { rect = new Rectangle(Bounds.Left + Bounds.Width / 2, Bounds.Top + 1, (RGFloat)(Bounds.Width * (value / 2.0d)), Bounds.Height - 1); if (rect.Width > 0 && rect.Height > 0) { if (this.LinearGradient) { g.FillRectangleLinear(this.PositiveColor, new SolidColor(0, this.PositiveColor), 0, rect); } else { g.FillRectangle(rect, this.PositiveColor); } } } else { RGFloat center = Bounds.Left + Bounds.Width / 2.0f; RGFloat left = (RGFloat)(Bounds.Width * value * 0.5d); rect = new Rectangle(center + left, Bounds.Top + 1, -left, Bounds.Height - 1); if (rect.Width > 0 && rect.Height > 0) { if (this.LinearGradient) { g.FillRectangleLinear(this.NegativeColor, new SolidColor(0, this.NegativeColor), 180, rect); } else { g.FillRectangle(rect, this.NegativeColor); } } } if (DisplayCellText) { dc.DrawCellText(); } }
/// <summary> /// Paint the content of body. /// </summary> /// <param name="dc">Platform independency graphics context.</param> public virtual void OnPaint(CellDrawingContext dc) { dc.DrawCellBackground(); dc.DrawCellText(); }