Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
fe410470
Commit
fe410470
authored
15 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
fix the positioning of glyph items
parent
0c320989
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapWindow/items/zmapWindowCollectionFeature.c
+17
-6
17 additions, 6 deletions
src/zmapWindow/items/zmapWindowCollectionFeature.c
with
17 additions
and
6 deletions
src/zmapWindow/items/zmapWindowCollectionFeature.c
+
17
−
6
View file @
fe410470
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
May
2
7
1
5
:5
5
2009 (rds)
* Last edited:
Jun
2 1
6
:5
2
2009 (rds)
* Created: Wed Dec 3 10:02:22 2008 (rds)
* CVS info: $Id: zmapWindowCollectionFeature.c,v 1.
3
2009-06-02 1
1:20:23
rds Exp $
* CVS info: $Id: zmapWindowCollectionFeature.c,v 1.
4
2009-06-02 1
5:59:11
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -295,6 +295,7 @@ void zMapWindowCollectionFeatureAddIncompleteMarkers(ZMapWindowCanvasItem collec
NULL
,
&
y_coord
,
NULL
,
NULL
);
y_coord
=
ceil
(
y_coord
);
/* line_thickness */
y_coord
=
curr_feature
->
x1
-
((
FooCanvasGroup
*
)
collection
)
->
ypos
-
1
.
0
;
/* Ext2Zero */
foo_canvas_item_new
(
FOO_CANVAS_GROUP
(
collection
->
items
[
WINDOW_ITEM_OVERLAY
]),
zMapWindowGlyphItemGetType
(),
...
...
@@ -319,10 +320,14 @@ void zMapWindowCollectionFeatureAddIncompleteMarkers(ZMapWindowCanvasItem collec
{
double
x_coord
,
y_coord
;
x_coord
=
get_glyph_mid_point
(
fir
st_item
,
width
,
NULL
,
&
y_coord
,
NULL
,
NULL
);
x_coord
=
get_glyph_mid_point
(
la
st_item
,
width
,
NULL
,
NULL
,
NULL
,
&
y_coord
);
y_coord
=
floor
(
y_coord
);
/* line_thickness */
y_coord
=
curr_feature
->
x2
-
((
FooCanvasGroup
*
)
collection
)
->
ypos
;
if
(((
FooCanvasGroup
*
)(
collection
->
items
[
WINDOW_ITEM_OVERLAY
]))
->
ypos
!=
0
.
0
)
g_warning
(
"non zero group!"
);
foo_canvas_item_new
(
FOO_CANVAS_GROUP
(
collection
->
items
[
WINDOW_ITEM_OVERLAY
]),
zMapWindowGlyphItemGetType
(),
...
...
@@ -681,8 +686,8 @@ static double get_glyph_mid_point(FooCanvasItem *item, double glyph_width,
double
x
,
x1
,
x2
,
y1
,
y2
;
foo_canvas_item_get_bounds
(
item
,
&
x1
,
&
y1
,
&
x2
,
&
y2
);
/* centre point - half width + rounding */
x
=
((
x2
-
x1
)
*
0
.
5
)
-
(
glyph_width
*
0
.
5
)
+
0
.
5
;
/* centre point
- half width + rounding */
x
=
((
(
x2
-
x1
)
*
0
.
5
)
+
x1
)
-
(
glyph_width
*
0
.
5
)
+
0
.
5
;
if
(
x1_out
)
*
x1_out
=
x1
;
...
...
@@ -754,6 +759,7 @@ static void add_colinear_lines(gpointer data, gpointer user_data)
colinear_data
->
compare_data
);
if
(
colinearity
!=
0
)
{
FooCanvasGroup
*
canvas_group
;
double
py1
,
py2
,
cy1
,
cy2
;
if
(
colinearity
==
COLINEAR_NOT
)
draw_colour
=
&
colinear_data
->
non_colinear
;
...
...
@@ -766,9 +772,14 @@ static void add_colinear_lines(gpointer data, gpointer user_data)
foo_canvas_item_get_bounds
(
previous
,
NULL
,
&
py1
,
NULL
,
&
py2
);
foo_canvas_item_get_bounds
(
current
,
NULL
,
&
cy1
,
NULL
,
&
cy2
);
canvas_group
=
(
FooCanvasGroup
*
)
canvas_item
;
y1
=
floor
(
py2
);
y2
=
ceil
(
cy1
);
y1
=
prev_feature
->
x2
-
canvas_group
->
ypos
;
y2
=
curr_feature
->
x1
-
canvas_group
->
ypos
-
1
.
0
;
/* Ext2Zero */
coords
[
0
]
=
colinear_data
->
x
;
coords
[
1
]
=
y1
;
coords
[
2
]
=
colinear_data
->
x
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment