Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
jordibc committed Jan 22, 2024
1 parent 98d05d2 commit 3f07708
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions ete4/smartview/renderer/drawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,32 @@ def get_empty_active():
return TreeActive(nodes, clades)


# They are all "generalized coordinates" (can be radius and angle, say).

# The coordinates (x, y, dx, dy) are all "generalized coordinates" (x and y
# can refer to radius and angle, for example).

# The convention for coordinates is:
# x increases to the right, y increases to the bottom.
#
# +-----> x +------.
# | \ a .
# | \ . (the angle thus increases clockwise too)
# | \ .
# | \ . a (the angle thus increases clockwise too)
# v y r \.
#
# This is the convention normally used in computer graphics, including SVGs,
# HTML Canvas, Qt, and PixiJS.
#
# The boxes (shapes) we use are:
#
# * Rectangle w
# x,y +-----+ so (x,y) is its (left,top) corner
# | | h and (x+w,y+h) its (right,bottom) one
# +-----+
# * Rectangle w
# x,y +-----+ so (x,y) is its (left,top) corner
# | | h and (x+w,y+h) its (right,bottom) one
# +-----+
#
# * Annular sector r,a .----.
# . dr . so (r,a) is its (inner,smaller-angle) corner
# \ . and (r+dr,a+da) its (outer,bigger-angle) one
# \. da
# * Annular sector dr
# r,a .----.
# . . so (r,a) is its (inner,smaller-angle) corner
# \ . da and (r+dr,a+da) its (outer,bigger-angle) one
# \.

# Drawing.

Expand Down

0 comments on commit 3f07708

Please sign in to comment.