Example #1
0
        protected override void OnMouseMove(object o, Gtk.MotionNotifyEventArgs args, Cairo.PointD point)
        {
            if (!is_drawing)
                return;

            double x = Utility.Clamp (point.X, 0, PintaCore.Workspace.ImageSize.X - 1);
            double y = Utility.Clamp (point.Y, 0, PintaCore.Workspace.ImageSize.Y - 1);

            PintaCore.Layers.ShowSelection = true;

            ImageSurface surf = PintaCore.Layers.ToolLayer.Surface;

            using (Context g = new Context (surf)) {
                g.Antialias = Antialias.Subpixel;

                if (path != null) {
                    g.AppendPath (path);
                    (path as IDisposable).Dispose ();
                }

                g.LineTo (x, y);

                path = g.CopyPath ();

                g.FillRule = FillRule.EvenOdd;
                g.ClosePath ();

                Path old = PintaCore.Layers.SelectionPath;

                PintaCore.Layers.SelectionPath = g.CopyPath ();
                (old as IDisposable).Dispose ();
            }

            PintaCore.Workspace.Invalidate ();
        }
Example #2
0
 public static Cairo.Color AlphaBlend (Cairo.Color ca, Cairo.Color cb, double alpha)
 {
     return new Cairo.Color (
         (1.0 - alpha) * ca.R + alpha * cb.R,
         (1.0 - alpha) * ca.G + alpha * cb.G,
         (1.0 - alpha) * ca.B + alpha * cb.B);
 }
Example #3
0
		public static Cairo.Rectangle PointsToRectangle (Cairo.PointD p1, Cairo.PointD p2, bool constrain)
		{
			// We want to create a rectangle that always has positive width/height
			double x, y, w, h;

			if (p1.Y <= p2.Y) {
				y = p1.Y;
				h = p2.Y - y + 1;
			} else {
				y = p2.Y;
				h = p1.Y - y + 1;
			}

			if (p1.X <= p2.X) {
				x = p1.X;

				if (constrain)
					w = h;
				else
					w = p2.X - x + 1;
			} else {
				x = p2.X;

				if (constrain) {
					w = h;
					x = p1.X - w;
				} else
					w = p1.X - x + 1;
			}

			return new Cairo.Rectangle (x, y, w, h);
		}
 public static Cairo.Color ColorAdjustBrightness(Cairo.Color @base, double br)
 {
     double h, s, b;
     HsbFromColor(@base, out h, out s, out b);
     b = Math.Max(Math.Min(br, 1), 0);
     return ColorFromHsb(h, s, b);
 }
Example #5
0
        public override void DrawColumnHeaderFocus(Cairo.Context cr, Gdk.Rectangle alloc)
        {
            double top_offset = 2.0;
            double right_offset = 2.0;

            double margin = 0.5;
            double line_width = 0.7;

            Cairo.Color stroke_color = CairoExtensions.ColorShade (
                CairoExtensions.GdkRGBAToCairoColor (
                    Widget.StyleContext.GetBackgroundColor (StateFlags.Selected)), 0.8);

            stroke_color.A = 0.1;
            cr.Color = stroke_color;

            CairoExtensions.RoundedRectangle (cr,
                alloc.X + margin + line_width + right_offset,
                alloc.Y + margin + line_width + top_offset,
                alloc.Width - (margin + line_width)*2.0 - right_offset,
                alloc.Height - (margin + line_width)*2.0 - top_offset,
                Context.Radius/2.0, CairoCorners.None);

            cr.Fill ();

            stroke_color.A = 1.0;
            cr.LineWidth = line_width;
            cr.Color = stroke_color;
            CairoExtensions.RoundedRectangle (cr,
                alloc.X + margin + line_width + right_offset,
                alloc.Y + margin + line_width + top_offset,
                alloc.Width - (line_width + margin)*2.0 - right_offset,
                alloc.Height - (line_width + margin)*2.0 - right_offset,
                Context.Radius/2.0, CairoCorners.All);
            cr.Stroke ();
        }
Example #6
0
		public UnderlineMarker (Cairo.Color color, int start, int end)
		{
			this.Color = color;
			this.StartCol = start;
			this.EndCol = end;
			this.Wave = false;
		}
Example #7
0
        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            Text.ShadowedText(g, MenuState.ConfigScreen.Control.Info, X + 20, Y + 27);
        }
Example #8
0
        protected override bool OnDrawn(Cairo.Context cr)
        {
            double step_width = Allocation.Width / (double)steps;
            double step_height = Allocation.Height / (double)steps;
            double h = 1.0;
            double s = 0.0;

            for (int xi = 0, i = 0; xi < steps; xi++) {
                for (int yi = 0; yi < steps; yi++, i++) {
                    double bg_b = (double)(i / 255.0);
                    double fg_b = 1.0 - bg_b;

                    double x = xi * step_width;
                    double y = yi * step_height;

                    cr.Rectangle (x, y, step_width, step_height);
                    cr.Color = CairoExtensions.ColorFromHsb (h, s, bg_b);
                    cr.Fill ();

                    int tw, th;
                    Pango.Layout layout = new Pango.Layout (PangoContext);
                    layout.SetText (((int)(bg_b * 255.0)).ToString ());
                    layout.GetPixelSize (out tw, out th);

                    cr.Translate (0.5, 0.5);
                    cr.MoveTo (x + (step_width - tw) / 2.0, y + (step_height - th) / 2.0);
                    cr.Color = CairoExtensions.ColorFromHsb (h, s, fg_b);
                    PangoCairoHelper.ShowLayout (cr, layout);
                    cr.Translate (-0.5, -0.5);
                }
            }

            return true;
        }
Example #9
0
	static void draw (Cairo.Context gr, int width, int height)
	{
		gr.Scale (width, height);
		gr.LineWidth = 0.04;
		
		gr.MoveTo ( new PointD (0.5, 0.1) );
		gr.LineTo ( new PointD (0.9, 0.9) );
		gr.RelLineTo ( new Distance (-0.4, 0.0) );
		gr.CurveTo ( new PointD (0.2, 0.9),
			     new PointD ( 0.2, 0.5),
			     new PointD (0.5, 0.5)
			     );
		gr.ClosePath ();
		
		gr.MoveTo ( new PointD (0.25, 0.1) );
		gr.RelLineTo ( new Distance (0.2, 0.2) );
		gr.RelLineTo ( new Distance ( -0.2, 0.2) );
		gr.RelLineTo ( new Distance (-0.2, -0.2) );
		gr.ClosePath ();	       
		
		gr.Color = new Color (0, 0, 1, 1);
		gr.FillPreserve ();
		gr.Color = new Color ( 0, 0, 0, 1);
		gr.Stroke ();
	}
 public DrawInRegionVisitor(Gdk.Region region, Cairo.Context context, IDrawingView view)
 {
     this.context = context;
     this.region = region;
     this.view = view;
     this.figures = new List<Figure> ();
 }
Example #11
0
		public void Draw (Cairo.Context g, double scale, bool fillSelection)
		{
			g.Save ();
			g.Translate (0.5, 0.5);
			g.Scale (scale, scale);
			
			g.AppendPath (SelectionPath);
			
			if (fillSelection)
			{
				g.SetSourceColor (new Cairo.Color (0.7, 0.8, 0.9, 0.2));
				g.FillRule = Cairo.FillRule.EvenOdd;
				g.FillPreserve ();
			}
			
			g.LineWidth = 1 / scale;
			
			// Draw a white line first so it shows up on dark backgrounds
			g.SetSourceColor (new Cairo.Color (1, 1, 1));
			g.StrokePreserve ();
			
			// Draw a black dashed line over the white line
			g.SetDash (new double[] { 2 / scale, 4 / scale }, 0);
			g.SetSourceColor (new Cairo.Color (0, 0, 0));
			
			g.Stroke ();
			g.Restore ();
		}
Example #12
0
		public override void DrawContent (Cairo.Context Context, Cairo.Rectangle Area)
		{
			Context.Color = new Color (0, 0, 0);
			Pango.CairoHelper.UpdateLayout (Context, textLayout);
			Context.MoveTo (Area.X, Area.Y);
			Pango.CairoHelper.ShowLayout (Context, textLayout);
		}
Example #13
0
 public CairoImageCellRenderer(int width, int height, Cairo.ImageSurface default_surface, RequestThumbnailEventHandler request_thumbnail)
 {
     this.width = width;
     this.height = height;
     this.default_surface = default_surface;
     this.request_thumbnail = request_thumbnail;
 }
Example #14
0
        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(Text.FONT_SIZE_LABEL);

            Text.ShadowedText(g, "Equip", X + 20, Y + 25);
        }
Example #15
0
	static void draw (Cairo.Context gr, int width, int height)
	{
		double x=0.1,  y=0.5;
		double x1=0.4, y1=0.9, x2=0.6, y2=0.1, x3=0.9, y3=0.5;
		
				
		gr.Scale (width, height);
		gr.LineWidth = 0.04;		
		
		gr.MoveTo ( new PointD (x, y) );
		
		gr.CurveTo ( new PointD (x1, y1),
			     new PointD (x2, y2), 
			     new PointD (x3, y3)
			     );
		
		gr.Stroke ();
		
		gr.Color = new Color (1, 0.2, 0.2, 0.6);
		gr.LineWidth = 0.03;
		gr.MoveTo ( new PointD (x, y) );
		gr.LineTo ( new PointD (x1, y1) );
		gr.MoveTo ( new PointD (x2, y2) );
		gr.LineTo ( new PointD (x3, y3) );
		gr.Stroke ();						
	}
Example #16
0
        protected override void onDraw(Cairo.Context gr)
        {
            Rectangle rBack = new Rectangle (Slot.Size);

            //rBack.Inflate (-Margin);
            //			if (BorderWidth > 0)
            //				rBack.Inflate (-BorderWidth / 2);

            Background.SetAsSource (gr, rBack);
            CairoHelpers.CairoRectangle(gr, rBack, CornerRadius);
            gr.Fill ();

            if (BorderWidth > 0) {
                Foreground.SetAsSource (gr, rBack);
                CairoHelpers.CairoRectangle(gr, rBack, CornerRadius, BorderWidth);
            }

            gr.Save ();
            if (ClipToClientRect) {
                //clip to client zone
                CairoHelpers.CairoRectangle (gr, ClientRectangle,Math.Max(0.0, CornerRadius-Margin));
                gr.Clip ();
            }

            if (child != null)
                child.Paint (ref gr);
            gr.Restore ();
        }
Example #17
0
File: arc.cs Project: nlhepler/mono
	static void draw (Cairo.Context gr, int width, int height)
	{
		double xc = 0.5;
		double yc = 0.5;
		double radius = 0.4;
		double angle1 = 45.0  * (M_PI/180.0);  /* angles are specified */
		double angle2 = 180.0 * (M_PI/180.0);  /* in radians           */
		
		gr.Scale (width, height);
		gr.LineWidth = 0.04;

		
		gr.Arc (xc, yc, radius, angle1, angle2);
		gr.Stroke ();
		
		/* draw helping lines */
		gr.Color = new Color(1, 0.2, 0.2, 0.6);
		gr.Arc (xc, yc, 0.05, 0, 2*M_PI);
		gr.Fill ();
		gr.LineWidth = 0.03;
		gr.Arc (xc, yc, radius, angle1, angle1);
		gr.LineTo (new PointD(xc, yc));
		gr.Arc (xc, yc, radius, angle2, angle2);
		gr.LineTo (new PointD(xc, yc));
		gr.Stroke ();
		
	}
Example #18
0
        protected override void OnMouseDown(Gtk.DrawingArea canvas, Gtk.ButtonPressEventArgs args, Cairo.PointD point)
        {
            origin_offset = point;
            is_dragging = true;

            hist = new MovePixelsHistoryItem (Icon, Name);
            hist.TakeSnapshot ();

            if (!PintaCore.Layers.ShowSelectionLayer) {
                // Copy the selection to the temp layer
                PintaCore.Layers.CreateSelectionLayer ();
                PintaCore.Layers.ShowSelectionLayer = true;

                using (Cairo.Context g = new Cairo.Context (PintaCore.Layers.SelectionLayer.Surface)) {
                    g.AppendPath (PintaCore.Layers.SelectionPath);
                    g.FillRule = FillRule.EvenOdd;
                    g.SetSource (PintaCore.Layers.CurrentLayer.Surface);
                    g.Clip ();
                    g.Paint ();
                }

                Cairo.ImageSurface surf = PintaCore.Layers.CurrentLayer.Surface;

                using (Cairo.Context g = new Cairo.Context (surf)) {
                    g.AppendPath (PintaCore.Layers.SelectionPath);
                    g.FillRule = FillRule.EvenOdd;
                    g.Operator = Cairo.Operator.Clear;
                    g.Fill ();
                }
            }

            canvas.GdkWindow.Invalidate ();
        }
Example #19
0
        protected override void DrawContents(Gdk.Drawable d, Cairo.Context g, int width, int height, bool screenChanged)
        {
            g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold);
            g.SetFontSize(24);

            TextExtents te;

            Text.ShadowedText(g, "Time", X + x1, Y + y1);
            Text.ShadowedText(g, "Gil", X + x1, Y + y2);

            g.SelectFontFace("Courier New", FontSlant.Normal, FontWeight.Bold);

            long s, m, h;
            s = GameClock.Seconds;
            m = GameClock.Minutes;
            h = GameClock.Hours;

            string time = String.Format("{0:D2}:{1:D2}:{2:D2}", h, m, s);

            te = g.TextExtents(time);
            Text.ShadowedText(g, time, X + x2 - te.Width, Y + y1);

            te = g.TextExtents(Gil);
            Text.ShadowedText(g, Gil, X + x2 - te.Width, Y + y2);
        }
Example #20
0
        protected void DrawHorizontalSectionIndicator(string text, Cairo.Context cr, Pango.Layout layout, double x, double y, double w, out double h)
        {
            cr.MoveTo(x,y);
            cr.LineTo(x,y+SectionSerifeWidth*2);
            cr.MoveTo(x,y+SectionSerifeWidth);
            cr.LineTo(x+w,y+SectionSerifeWidth);
            cr.MoveTo(x+w,y);
            cr.LineTo(x+w,y+SectionSerifeWidth*2);
            cr.Color = new Cairo.Color(0, 0, 0);
            cr.LineWidth = 1;
            cr.Stroke();

            layout.Width = (int)(w*Pango.Scale.PangoScale);
            layout.Alignment = Pango.Alignment.Center;
            layout.SetText (text);
            layout.Ellipsize = EllipsizeMode.Middle;
            layout.Justify = true;
            cr.Color = new Cairo.Color(0, 0, 0);
            cr.MoveTo(x,y+SectionSerifeWidth*2);
            Pango.CairoHelper.ShowLayout (cr, layout);

            int lw,lh;
            layout.GetPixelSize(out lw, out lh);
            h=(double)lh+SectionSerifeWidth*2;
        }
Example #21
0
	static void draw (Cairo.Context gr, int width, int height)
	{
		int w, h;
		ImageSurface image;
		
		gr.Scale (width, height);
		gr.LineWidth = 0.04;
		
		gr.Arc (0.5, 0.5, 0.3, 0, 2*M_PI);
		gr.Clip ();
		gr.NewPath ();
		
		image = new ImageSurface("data/e.png");
		w = image.Width;
		h = image.Height;
		
		gr.Scale (1.0/w, 1.0/h);
		
		image.Show (gr, 0, 0);
		
		image.Destroy();
		
		gr.Arc (0.5, 0.5, 0.3, 0, 2 * M_PI);
		gr.Clip ();
		
		gr.NewPath ();
		gr.Rectangle (new PointD (0, 0), 1, 1);
		gr.Fill ();
		gr.Color = new Color (0, 1, 0, 1);
		gr.MoveTo ( new PointD (0, 0) );
		gr.LineTo ( new PointD (1, 1) );
		gr.MoveTo ( new PointD (1, 0) );
		gr.LineTo ( new PointD (0, 1) );
		gr.Stroke ();
	}
Example #22
0
        protected override void ClippedRender (Cairo.Context cr)
        {
            Brush brush = Background;
            if (!brush.IsValid) {
                return;
            }

            double x = Double.IsNaN (brush.Width)
                ? 0
                : (RenderSize.Width - brush.Width) * XAlign;

            double y = Double.IsNaN (brush.Height)
                ? 0
                : (RenderSize.Height - brush.Height) * YAlign;

            cr.Rectangle (0, 0, RenderSize.Width, RenderSize.Height);
            cr.ClipPreserve ();

            if (x != 0 || y != 0) {
                cr.Translate (x, y);
            }

            cr.Antialias = Cairo.Antialias.None;
            brush.Apply (cr);
            cr.Fill ();
        }
Example #23
0
		public override void Draw (TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
		{
			int markerStart = LineSegment.Offset + System.Math.Max (StartCol - 1, 0);
			int markerEnd = LineSegment.Offset + (EndCol < 1 ? LineSegment.Length : EndCol - 1);
			if (markerEnd < startOffset || markerStart > endOffset) 
				return;
			
			bool drawOverlay = result.InspectionMark == IssueMarker.GrayOut;
			
			if (drawOverlay && editor.IsSomethingSelected) {
				var selectionRange = editor.SelectionRange;
				if (selectionRange.Contains (markerStart) && selectionRange.Contains (markerEnd))
					return;
				if (selectionRange.Contains (markerEnd))
					markerEnd = selectionRange.Offset;
				if (selectionRange.Contains (markerStart))
					markerStart = selectionRange.EndOffset;
				if (markerEnd <= markerStart)
					return;
			}
			
			double drawFrom;
			double drawTo;
				
			if (markerStart < startOffset && endOffset < markerEnd) {
				drawFrom = startXPos;
				drawTo = endXPos;
			} else {
				int start = startOffset < markerStart ? markerStart : startOffset;
				int end = endOffset < markerEnd ? endOffset : markerEnd;
				int /*lineNr,*/ x_pos;
				
				x_pos = layout.IndexToPos (start - startOffset).X;
				drawFrom = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
				x_pos = layout.IndexToPos (end - startOffset).X;
	
				drawTo = startXPos + (int)(x_pos / Pango.Scale.PangoScale);
			}
			
			drawFrom = System.Math.Max (drawFrom, editor.TextViewMargin.XOffset);
			drawTo = System.Math.Max (drawTo, editor.TextViewMargin.XOffset);
			if (drawFrom >= drawTo)
				return;
			
			double height = editor.LineHeight / 5;
			cr.Color = ColorName == null ? Color : editor.ColorStyle.GetColorFromDefinition (ColorName);
			if (drawOverlay) {
				cr.Rectangle (drawFrom, y, drawTo - drawFrom, editor.LineHeight);
				var color = editor.ColorStyle.Default.CairoBackgroundColor;
				color.A = 0.6;
				cr.Color = color;
				cr.Fill ();
			} else if (Wave) {	
				Pango.CairoHelper.ShowErrorUnderline (cr, drawFrom, y + editor.LineHeight - height, drawTo - drawFrom, height);
			} else {
				cr.MoveTo (drawFrom, y + editor.LineHeight - 1);
				cr.LineTo (drawTo, y + editor.LineHeight - 1);
				cr.Stroke ();
			}
		}
Example #24
0
		protected override bool OnDrawn(Cairo.Context cr)
		{
			bool ret = true;
			var rect = this.Allocation;
			if (rect.Width > 0 && rect.Height > 0)
			{
				var arrowWidth = popupButton.Allocation.Width;
				var arrowPos = rect.Width - arrowWidth;
				var arrowSize = 10;

				StyleContext.Save();
				StyleContext.AddClass("entry");
				StyleContext.RenderBackground(cr, 0, 0, rect.Width, rect.Height);

				ret = base.OnDrawn(cr);

				StyleContext.RenderArrow(cr, Math.PI, arrowPos, (rect.Height - arrowSize) / 2, arrowSize);

				cr.SetSourceColor(new Cairo.Color(.8, .8, .8));
				cr.Rectangle(arrowPos - 5, 2, 1, rect.Height - 4);
				cr.Fill();

				Entry.StyleContext.RenderFrame(cr, 0, 0, rect.Width, rect.Height);
				StyleContext.Restore();

			}
			return ret;
		}
		static void DrawIcon (MonoTextEditor editor, Cairo.Context cr, DocumentLine lineSegment, double x, double y, double width, double height)
		{
			if (lineSegment.IsBookmarked) {
				var color1 = editor.ColorStyle.Bookmarks.Color;
				var color2 = editor.ColorStyle.Bookmarks.SecondColor;
				
				DrawRoundRectangle (cr, x + 1, y + 1, 8, width - 4, height - 4);

				// FIXME: VV: Remove gradient features
				using (var pat = new Cairo.LinearGradient (x + width / 4, y, x + width / 2, y + height - 4)) {
					pat.AddColorStop (0, color1);
					pat.AddColorStop (1, color2);
					cr.SetSource (pat);
					cr.FillPreserve ();
				}

				// FIXME: VV: Remove gradient features
				using (var pat = new Cairo.LinearGradient (x, y + height, x + width, y)) {
					pat.AddColorStop (0, color2);
					//pat.AddColorStop (1, color1);
					cr.SetSource (pat);
					cr.Stroke ();
				}
			}
		}
Example #26
0
		public ImageSurface (IntPtr data, Cairo.Format format, int width, int height, int stride)
		{
			surface = NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride);
			lock (surfaces.SyncRoot){
				surfaces [surface] = this;
			}
		}
Example #27
0
		protected void DrawCircle (Cairo.Context cr, double x, double y, double size)
		{
			x += 0.5; y += 0.5;
			cr.NewPath ();
			cr.Arc (x + size/2, y + size / 2, (size-4)/2, 0, 2 * Math.PI);
			cr.ClosePath ();
		}
Example #28
0
        public override void Paint(Cairo.Context gr, Rectangle rect, string subPart = "")
        {
            float widthRatio = 1f;
            float heightRatio = 1f;

            if (Scaled) {
                widthRatio = (float)rect.Width / Dimensions.Width;
                heightRatio = (float)rect.Height / Dimensions.Height;
            }
            if (KeepProportions) {
                if (widthRatio < heightRatio)
                    heightRatio = widthRatio;
                else
                    widthRatio = heightRatio;
            }

            gr.Save ();

            gr.Translate (rect.Left,rect.Top);
            gr.Scale (widthRatio, heightRatio);
            gr.Translate (((float)rect.Width/widthRatio - Dimensions.Width)/2f, ((float)rect.Height/heightRatio - Dimensions.Height)/2f);

            if (string.IsNullOrEmpty (subPart))
                hSVG.RenderCairo (gr);
            else
                hSVG.RenderCairoSub (gr, "#" + subPart);

            gr.Restore ();
        }
Example #29
0
		public static void DrawRoundRectangle (Cairo.Context cr, double x, double y, double r, double w, double h)
		{
			const double ARC_TO_BEZIER = 0.55228475;
			double radius_x = r;
			double radius_y = r / 4;
			
			if (radius_x > w - radius_x)
				radius_x = w / 2;
					
			if (radius_y > h - radius_y)
				radius_y = h / 2;
			
			double c1 = ARC_TO_BEZIER * radius_x;
			double c2 = ARC_TO_BEZIER * radius_y;
			
			cr.NewPath ();
			cr.MoveTo (x + radius_x, y);
			cr.RelLineTo (w - 2 * radius_x, 0.0);
			cr.RelCurveTo (c1, 0.0, 
			               radius_x, c2, 
			               radius_x, radius_y);
			cr.RelLineTo (0, h - 2 * radius_y);
			cr.RelCurveTo (0.0, c2, c1 - radius_x, radius_y, -radius_x, radius_y);
			cr.RelLineTo (-w + 2 * radius_x, 0);
			cr.RelCurveTo (-c1, 0, -radius_x, -c2, -radius_x, -radius_y);
			cr.RelLineTo (0, -h + 2 * radius_y);
			cr.RelCurveTo (0.0, -c2, radius_x - c1, -radius_y, radius_x, -radius_y);
			cr.ClosePath ();
		}
Example #30
0
		internal protected override void Draw (Cairo.Context cr, Cairo.Rectangle area, LineSegment lineSegment, int line, double x, double y, double lineHeight)
		{
			cr.MoveTo (x + 0.5, y);
			cr.LineTo (x + 0.5, y + lineHeight);
			cr.Color = color;
			cr.Stroke ();
		}