public void Draw(SpriteBatch spriteBatch) { foreach (GlassPane Glass in Edges) { Glass.Draw(spriteBatch); } }
protected override bool OnExposeEvent(Gdk.EventExpose args) { Rectangle area; //Console.WriteLine ("expose {0}", args.Area); foreach (Rectangle sub in args.Region.GetRectangles()) { if (sub.Intersect(background, out area)) { Rectangle active = background; int min_x = BoxX(min_limit.Position); int max_x = BoxX(max_limit.Position + 1); active.X = min_x; active.Width = max_x - min_x; if (active.Intersect(area, out active)) { GdkWindow.DrawRectangle(Style.BaseGC(State), true, active); } int i; BoxXHit(area.X, out i); int end; BoxXHit(area.X + area.Width, out end); while (i <= end) { DrawBox(area, i++); } } Style.PaintShadow(this.Style, GdkWindow, State, ShadowType.In, area, this, null, background.X, background.Y, background.Width, background.Height); if (sub.Intersect(legend, out area)) { int i = 0; while (i < box_counts.Length) { DrawTick(area, i++); } } if (has_limits) { if (min_limit != null) { min_limit.Draw(sub); } if (max_limit != null) { max_limit.Draw(sub); } } if (glass != null) { glass.Draw(sub); } } return(base.OnExposeEvent(args)); }
protected override bool OnExposeEvent(Gdk.EventExpose args) { Rectangle area; //Console.WriteLine ("expose {0}", args.Area); foreach (Rectangle sub in args.Region.GetRectangles()) { if (sub.Intersect(background, out area)) { Rectangle active = background; int min_x = BoxX(min_limit.Position); int max_x = BoxX(max_limit.Position + 1); active.X = min_x; active.Width = max_x - min_x; // white background for entire widget if (active.Intersect(area, out active)) { GdkWindow.DrawRectangle(Style.BaseGC(State), true, active); } // draw bars indicating photo counts int i; BoxXHit(area.X, out i); int end; BoxXHit(area.X + area.Width, out end); while (i <= end) { DrawBox(area, i++); } } Style.PaintShadow(this.Style, GdkWindow, State, ShadowType.In, area, this, null, background.X, background.Y, background.Width, background.Height); // draw ticks and legend if (sub.Intersect(legend, out area)) { int i = 0; while (i < box_counts.Length) { DrawTick(area, i++); } } // draw limit markers and glass if needed (drawing done inside confines of action_area) if (sub.Intersect(action_area, out area)) { // draw limits markers if (has_limits) { if (min_limit != null) { min_limit.Draw(area); } if (max_limit != null) { max_limit.Draw(area); } } // draw glass if (glass != null) { glass.Draw(area); } } } return(base.OnExposeEvent(args)); }