Re: How to draw a simply dot in cairo?
- From: monkeymagic <paulharradine hotmail com>
- To: gtkmm-list gnome org
- Subject: Re: How to draw a simply dot in cairo?
- Date: Tue, 19 May 2009 00:23:05 -0700 (PDT)
Gday,
I was annoyed that Cairo couldn't stroke a 1x1 Rectangle, although 2x1 or
1x2 work??
Anyway to draw a point I used:
context.LineWidth = 1.0;
context.MoveTo ((double) p.X + 0.5, (double) p.Y);
context.LineTo ((double) p.X + 0.5, (double) p.Y + 1.0);
where p is a Gdk.Point.
I think this is pretty efficient compared to Arc ...
:drunk:
dancefire wrote:
>
> Hi,
>
> I know how to draw line, arc(circle) in cairo. however, I cannot find the
> efficient way to draw a simple round dot. I tried arc(), it works,
> however,
> it is very slow. I need draw thousands of the small dot with different
> radius. arc() is a little bit slow to do that.
>
> I also tried draw a rectangle with round cap, round join and 0 width and
> height. It works and seems faster than arc(). But I may in the wrong
> track.
>
> Could anyone point me out, how to draw a lot of dot with different radius
> efficiently? Thanks.
>
> --
> Tao Wang
> Microsoft Certified Technology Specialist
> CCNA
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
--
View this message in context: http://www.nabble.com/How-to-draw-a-simply-dot-in-cairo--tp23439145p23611033.html
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]