Steve,
Follows attached the patch to draw the star,
Att.
On Thu, Oct 1, 2009 at 12:14 PM, Steve Borho <st...@borho.org> wrote:
>
>
> On Thu, Oct 1, 2009 at 8:58 AM, Diego Oliveira <loki...@gmail.com> wrote:
>
>> What exactly this new line is intended to "make explicit"?
>>
>> + elif status == 1: # New changeset, recently added to tip
>> + # TODO: someone improve this, please
>> + ctx.set_source_rgb(0, 1, 0)
>> + ctx.arc(arrow_x, arrow_y, box_size / 5, 0, 2 * math.pi)
>>
>> Does this aims to show what the user just pulled from remote repo? If so,
>> what about a star?
>>
>
> Pulled, committed, qpush, whatever. Any changeset added to the repo after
> the dialog was opened. Yes, a star would be great.
>
> --
> Steve Borho
>
>
--
Att.
Diego de Oliveira
System Architect
di...@diegooliveira.com
www.diegooliveira.com
# HG changeset patch
# User Diego Oliveira <di...@diegooliveira.com>
# Date 1254410975 10800
# Node ID 222c05746e7b895b46b0d88664ee1298308613f0
# Parent 5f2e71ec6bc8c6ff8b16f06290e2b524ef7e323b
history: draw a star for new changeset added
diff -r 5f2e71ec6bc8 -r 222c05746e7b tortoisehg/hgtk/logview/graphcell.py
--- a/tortoisehg/hgtk/logview/graphcell.py Wed Sep 30 23:03:08 2009 -0500
+++ b/tortoisehg/hgtk/logview/graphcell.py Thu Oct 01 12:29:35 2009 -0300
@@ -185,16 +185,31 @@
ctx.line_to(x + 1, y + inc)
ctx.line_to(x - 2, y)
ctx.stroke_preserve()
+
+ def draw_star(x, y, radius, nodes):
+ total_nodes = nodes * 2 #inner + outer nodes
+ angle = 2 * math.pi / total_nodes;
+ for value in range(total_nodes + 1): # + 1 = backing to the start to close
+ radius_point = radius
+ if value % 2:
+ radius_point = 0.4 * radius_point;
+ arc_y = y - math.sin(angle * value) * radius_point
+ arc_x = x - math.cos(angle * value) * radius_point
+ if value == 0:
+ ctx.move_to(arc_x,arc_y)
+ else:
+ ctx.line_to(arc_x, arc_y)
+
arrow_y = arc_start_position_y - box_size / 4
arrow_x = arc_start_position_x + 7;
- ctx.rectangle(arrow_x, arrow_y, 2, 5)
if status == -1: # Outgoing arrow
+ ctx.rectangle(arrow_x, arrow_y, 2, 5)
draw_arrow(arrow_x, arrow_y, -3)
elif status == 1: # New changeset, recently added to tip
- # TODO: someone improve this, please
ctx.set_source_rgb(0, 1, 0)
- ctx.arc(arrow_x, arrow_y, box_size / 5, 0, 2 * math.pi)
+ draw_star(arrow_x + box_size / 4, arc_start_position_y , 4, 6)
elif status == 2: # Incoming (bundle preview) arrow
+ ctx.rectangle(arrow_x, arrow_y, 2, 5)
draw_arrow(arrow_x, arrow_y + 5, 3)
ctx.stroke_preserve()
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop