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
7361e55a
Commit
7361e55a
authored
16 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add drawglyph() func, don't use base func for these.
parent
ae98f08b
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
+64
-35
64 additions, 35 deletions
src/zmapWindow/zmapWindowItemFactory.c
with
64 additions
and
35 deletions
src/zmapWindow/zmapWindowItemFactory.c
+
64
−
35
View file @
7361e55a
...
...
@@ -28,9 +28,9 @@
*
* Exported functions: See zmapWindowItemFactory.h
* HISTORY:
* Last edited: Oct
7 11:58
2008 (
rds
)
* Last edited: Oct
28 13:01
2008 (
edgrif
)
* Created: Mon Sep 25 09:09:52 2006 (rds)
* CVS info: $Id: zmapWindowItemFactory.c,v 1.5
3
2008-10-
07 12:28:07 rds
Exp $
* CVS info: $Id: zmapWindowItemFactory.c,v 1.5
4
2008-10-
29 16:13:59 edgrif
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -120,6 +120,10 @@ static FooCanvasItem *drawSimpleFeature(RunSet run_data, ZMapFeature feature,
double
feature_offset
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
ZMapFeatureTypeStyle
style
);
static
FooCanvasItem
*
drawGlyphFeature
(
RunSet
run_data
,
ZMapFeature
feature
,
double
feature_offset
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
ZMapFeatureTypeStyle
style
);
static
FooCanvasItem
*
drawAlignFeature
(
RunSet
run_data
,
ZMapFeature
feature
,
double
feature_offset
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
...
...
@@ -186,10 +190,10 @@ const static ZMapWindowFToIFactoryMethodsStruct factory_methods_G[] = {
{
ZMAPSTYLE_MODE_TRANSCRIPT
,
drawTranscriptFeature
},
{
ZMAPSTYLE_MODE_RAW_SEQUENCE
,
drawSeqFeature
},
{
ZMAPSTYLE_MODE_PEP_SEQUENCE
,
drawPepFeature
},
{
ZMAPSTYLE_MODE_TEXT
,
drawSimpleAsTextFeature
},
{
ZMAPSTYLE_MODE_GRAPH
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_GLYPH
,
drawSimple
Feature
},
{
-
1
,
NULL
}
{
ZMAPSTYLE_MODE_TEXT
,
drawSimpleAsTextFeature
},
{
ZMAPSTYLE_MODE_GRAPH
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_GLYPH
,
drawGlyph
Feature
},
{
-
1
,
NULL
}
};
const
static
ZMapWindowFToIFactoryMethodsStruct
factory_text_methods_G
[]
=
{
...
...
@@ -199,10 +203,10 @@ const static ZMapWindowFToIFactoryMethodsStruct factory_text_methods_G[] = {
{
ZMAPSTYLE_MODE_TRANSCRIPT
,
drawTranscriptFeature
},
{
ZMAPSTYLE_MODE_RAW_SEQUENCE
,
drawSeqFeature
},
{
ZMAPSTYLE_MODE_PEP_SEQUENCE
,
drawPepFeature
},
{
ZMAPSTYLE_MODE_TEXT
,
drawSimpleAsTextFeature
},
{
ZMAPSTYLE_MODE_GRAPH
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_GLYPH
,
drawSimple
Feature
},
{
-
1
,
NULL
}
{
ZMAPSTYLE_MODE_TEXT
,
drawSimpleAsTextFeature
},
{
ZMAPSTYLE_MODE_GRAPH
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_GLYPH
,
drawGlyph
Feature
},
{
-
1
,
NULL
}
};
const
static
ZMapWindowFToIFactoryMethodsStruct
factory_graph_methods_G
[]
=
{
...
...
@@ -212,10 +216,10 @@ const static ZMapWindowFToIFactoryMethodsStruct factory_graph_methods_G[] = {
{
ZMAPSTYLE_MODE_TRANSCRIPT
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_RAW_SEQUENCE
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_PEP_SEQUENCE
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_TEXT
,
drawSimpleAsTextFeature
},
{
ZMAPSTYLE_MODE_GRAPH
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_GLYPH
,
drawSimple
Feature
},
{
-
1
,
NULL
}
{
ZMAPSTYLE_MODE_TEXT
,
drawSimpleAsTextFeature
},
{
ZMAPSTYLE_MODE_GRAPH
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_GLYPH
,
drawGlyph
Feature
},
{
-
1
,
NULL
}
};
const
static
ZMapWindowFToIFactoryMethodsStruct
factory_basic_methods_G
[]
=
{
...
...
@@ -225,10 +229,10 @@ const static ZMapWindowFToIFactoryMethodsStruct factory_basic_methods_G[] = {
{
ZMAPSTYLE_MODE_TRANSCRIPT
,
drawSimpleFeature
},
{
ZMAPSTYLE_MODE_RAW_SEQUENCE
,
drawSimpleFeature
},
{
ZMAPSTYLE_MODE_PEP_SEQUENCE
,
drawSimpleFeature
},
{
ZMAPSTYLE_MODE_TEXT
,
drawSimpleAsTextFeature
},
{
ZMAPSTYLE_MODE_GRAPH
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_GLYPH
,
drawSimple
Feature
},
{
-
1
,
NULL
}
{
ZMAPSTYLE_MODE_TEXT
,
drawSimpleAsTextFeature
},
{
ZMAPSTYLE_MODE_GRAPH
,
drawSimpleGraphFeature
},
{
ZMAPSTYLE_MODE_GLYPH
,
drawGlyph
Feature
},
{
-
1
,
NULL
}
};
...
...
@@ -781,11 +785,50 @@ static FooCanvasItem *drawSimpleFeature(RunSet run_data, ZMapFeature feature,
FooCanvasItem
*
feature_item
;
GdkColor
*
outline
=
NULL
,
*
foreground
=
NULL
,
*
background
=
NULL
;
guint
line_width
;
gboolean
status
;
line_width
=
factory
->
line_width
;
zmapWindowSeq2CanOffset
(
&
y1
,
&
y2
,
feature_offset
)
;
/* Make sure we cover the whole last base. */
if
(
feature
->
strand
==
ZMAPSTRAND_REVERSE
&&
zMapStyleColourByStrand
(
style
))
status
=
zMapStyleGetColours
(
style
,
ZMAPSTYLE_COLOURTARGET_STRAND
,
ZMAPSTYLE_COLOURTYPE_NORMAL
,
&
background
,
&
foreground
,
&
outline
)
;
else
status
=
zMapStyleGetColours
(
style
,
ZMAPSTYLE_COLOURTARGET_NORMAL
,
ZMAPSTYLE_COLOURTYPE_NORMAL
,
&
background
,
&
foreground
,
&
outline
)
;
zMapAssert
(
status
)
;
feature_item
=
zMapDrawBox
(
parent
,
x1
,
y1
,
x2
,
y2
,
outline
,
background
,
line_width
)
;
callItemHandler
(
factory
,
feature_item
,
ITEM_FEATURE_SIMPLE
,
feature
,
NULL
,
y1
,
y2
);
return
feature_item
;
}
static
FooCanvasItem
*
drawGlyphFeature
(
RunSet
run_data
,
ZMapFeature
feature
,
double
feature_offset
,
double
x1
,
double
y1
,
double
x2
,
double
y2
,
ZMapFeatureTypeStyle
style
)
{
ZMapWindowFToIFactory
factory
=
run_data
->
factory
;
FooCanvasGroup
*
parent
=
run_data
->
container
;
FooCanvasItem
*
feature_item
;
guint
line_width
;
line_width
=
factory
->
line_width
;
zmapWindowSeq2CanOffset
(
&
y1
,
&
y2
,
feature_offset
)
;
/* Make sure we cover the whole last base. */
/* There will be other alternatives to splice once we add them to the the canvas. */
if
(
feature
->
flags
.
has_boundary
)
{
GdkColor
*
splice_background
;
...
...
@@ -863,23 +906,6 @@ static FooCanvasItem *drawSimpleFeature(RunSet run_data, ZMapFeature feature,
glyph_type
,
splice_background
,
width
,
2
)
;
}
else
{
gboolean
status
;
if
(
feature
->
strand
==
ZMAPSTRAND_REVERSE
&&
zMapStyleColourByStrand
(
style
))
status
=
zMapStyleGetColours
(
style
,
ZMAPSTYLE_COLOURTARGET_STRAND
,
ZMAPSTYLE_COLOURTYPE_NORMAL
,
&
background
,
&
foreground
,
&
outline
)
;
else
status
=
zMapStyleGetColours
(
style
,
ZMAPSTYLE_COLOURTARGET_NORMAL
,
ZMAPSTYLE_COLOURTYPE_NORMAL
,
&
background
,
&
foreground
,
&
outline
)
;
zMapAssert
(
status
)
;
feature_item
=
zMapDrawBox
(
parent
,
x1
,
y1
,
x2
,
y2
,
outline
,
background
,
line_width
)
;
}
callItemHandler
(
factory
,
feature_item
,
ITEM_FEATURE_SIMPLE
,
...
...
@@ -889,6 +915,9 @@ static FooCanvasItem *drawSimpleFeature(RunSet run_data, ZMapFeature feature,
return
feature_item
;
}
/* Reduce the number of variables in drawAlignFeature slightly */
typedef
struct
{
...
...
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