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
1b888399
Commit
1b888399
authored
18 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
fix graph drawing to cope properly with baseline that is not zero.
parent
ff951a8c
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/zmapWindowItemFactory.c
+19
-8
19 additions, 8 deletions
src/zmapWindow/zmapWindowItemFactory.c
with
19 additions
and
8 deletions
src/zmapWindow/zmapWindowItemFactory.c
+
19
−
8
View file @
1b888399
...
...
@@ -28,9 +28,9 @@
*
* Exported functions: See zmapWindowItemFactory.h
* HISTORY:
* Last edited:
Dec 21 11:13
200
6
(edgrif)
* Last edited:
Jan 4 09:28
200
7
(edgrif)
* Created: Mon Sep 25 09:09:52 2006 (rds)
* CVS info: $Id: zmapWindowItemFactory.c,v 1.1
7
200
6-12-21 14:58:56
edgrif Exp $
* CVS info: $Id: zmapWindowItemFactory.c,v 1.1
8
200
7-01-04 09:29:47
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -1761,18 +1761,18 @@ static FooCanvasItem *drawSimpleGraphFeature(RunSet run_data, ZMapFeature featur
double
x1
,
double
y1
,
double
x2
,
double
y2
,
ZMapFeatureTypeStyle
style
)
{
ZMapWindowFToIFactory
factory
=
run_data
->
factory
;
FooCanvasGroup
*
parent
=
run_data
->
container
;
ZMapWindowFToIFactory
factory
=
run_data
->
factory
;
FooCanvasGroup
*
parent
=
run_data
->
container
;
FooCanvasItem
*
feature_item
;
GdkColor
*
outline
,
*
foreground
,
*
background
;
guint
line_width
;
GdkColor
*
outline
,
*
foreground
,
*
background
;
guint
line_width
;
double
numerator
,
denominator
,
dx
;
line_width
=
factory
->
line_width
;
zmapWindowSeq2CanOffset
(
&
y1
,
&
y2
,
feature_offset
)
;
/* Make sure we cover the whole last base. */
zMapFeatureTypeGetColours
(
style
,
&
background
,
&
foreground
,
&
outline
);
zMapFeatureTypeGetColours
(
style
,
&
background
,
&
foreground
,
&
outline
)
;
numerator
=
feature
->
score
-
style
->
min_score
;
denominator
=
style
->
max_score
-
style
->
min_score
;
...
...
@@ -1795,13 +1795,24 @@ static FooCanvasItem *drawSimpleGraphFeature(RunSet run_data, ZMapFeature featur
x1
=
0
.
0
+
(
style
->
width
*
style
->
baseline
)
;
x2
=
0
.
0
+
(
style
->
width
*
dx
)
;
/* If the baseline is not zero then we can end up with x2 being less than x1 so swop them for
* drawing, perhaps the drawing code should take care of this. */
if
(
x1
>
x2
)
{
double
tmp
;
tmp
=
x1
;
x1
=
x2
;
x2
=
tmp
;
}
feature_item
=
zMapDrawBox
(
parent
,
x1
,
y1
,
x2
,
y2
,
outline
,
background
,
line_width
)
;
callItemHandler
(
factory
,
feature_item
,
ITEM_FEATURE_SIMPLE
,
feature
,
NULL
,
y1
,
y2
);
feature
,
NULL
,
y1
,
y2
)
;
return
feature_item
;
}
...
...
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