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
4ae21d78
Commit
4ae21d78
authored
16 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
add function to report zoom in number of bases per line.
parent
fc6fd432
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/include/ZMap/zmapWindow.h
+3
-2
3 additions, 2 deletions
src/include/ZMap/zmapWindow.h
src/zmapWindow/zmapWindowZoomControl.c
+64
-7
64 additions, 7 deletions
src/zmapWindow/zmapWindowZoomControl.c
src/zmapWindow/zmapWindowZoomControl_P.h
+8
-3
8 additions, 3 deletions
src/zmapWindow/zmapWindowZoomControl_P.h
with
75 additions
and
12 deletions
src/include/ZMap/zmapWindow.h
+
3
−
2
View file @
4ae21d78
...
...
@@ -26,9 +26,9 @@
* window displaying genome data.
*
* HISTORY:
* Last edited:
Feb
1
2
1
5:51
2009 (
rds
)
* Last edited:
Mar
1
7
1
4:05
2009 (
edgrif
)
* Created: Thu Jul 24 15:21:56 2003 (edgrif)
* CVS info: $Id: zmapWindow.h,v 1.10
1
2009-0
2
-1
3
1
0:23:54 rds
Exp $
* CVS info: $Id: zmapWindow.h,v 1.10
2
2009-0
3
-1
7
1
5:52:20 edgrif
Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_WINDOW_H
...
...
@@ -250,6 +250,7 @@ double zMapWindowGetZoomFactor(ZMapWindow window);
double
zMapWindowGetZoomMin
(
ZMapWindow
window
)
;
double
zMapWindowGetZoomMax
(
ZMapWindow
window
)
;
double
zMapWindowGetZoomMagnification
(
ZMapWindow
window
);
double
zMapWindowGetZoomMagAsBases
(
ZMapWindow
window
)
;
double
zMapWindowGetZoomMaxDNAInWrappedColumn
(
ZMapWindow
window
);
void
zMapWindowZoomToFeature
(
ZMapWindow
window
,
ZMapFeature
feature
);
...
...
This diff is collapsed.
Click to expand it.
src/zmapWindow/zmapWindowZoomControl.c
+
64
−
7
View file @
4ae21d78
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Oct
17
09:03
200
7
(edgrif)
* Last edited:
Mar
17
15:51
200
9
(edgrif)
* Created: Fri Jul 8 11:37:39 2005 (rds)
* CVS info: $Id: zmapWindowZoomControl.c,v 1.1
7
200
7-10
-17 15:52:
47
edgrif Exp $
* CVS info: $Id: zmapWindowZoomControl.c,v 1.1
8
200
9-03
-17 15:52:
20
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -126,16 +126,49 @@ double zMapWindowGetZoomMax(ZMapWindow window)
double
zMapWindowGetZoomMagnification
(
ZMapWindow
window
)
{
ZMapWindowZoomControl
control
=
NULL
;
double
mag
;
ZMapWindowZoomControl
control
=
NULL
;
double
mag
;
control
=
controlFromWindow
(
window
)
;
control
=
controlFromWindow
(
window
);
/* Not sure what this actually needs to be calculating,
* but a ratio might be nice rather than just random numbers */
mag
=
control
->
maxZF
/
control
->
zF
;
mag
=
control
->
maxZF
/
control
->
zF
;
return
mag
;
return
mag
;
}
double
zMapWindowGetZoomMagAsBases
(
ZMapWindow
window
)
{
ZMapWindowZoomControl
control
=
NULL
;
double
bases
;
control
=
controlFromWindow
(
window
)
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
bases
=
control
->
zF
*
control
->
pix2mmy
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
bases
=
control
->
pix2mmy
/
control
->
zF
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
printf
(
"min/max/curr zoom: %g %g %g
\t
bases: %g
\n
"
,
control
->
minZF
,
control
->
maxZF
,
control
->
zF
,
bases
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
return
bases
;
}
#ifdef RDS_DONT_INCLUDE
PangoFont
*
zMapWindowGetFixedWidthFont
(
ZMapWindow
window
)
{
...
...
@@ -145,6 +178,7 @@ PangoFont *zMapWindowGetFixedWidthFont(ZMapWindow window)
}
#endif
/* Not sure this is right, copy with pango_font_description_copy and merge??? */
PangoFontDescription
*
zMapWindowZoomGetFixedWidthFontInfo
(
ZMapWindow
window
,
double
*
width_out
,
...
...
@@ -212,6 +246,29 @@ ZMapWindowZoomControl zmapWindowZoomControlCreate(ZMapWindow window)
// num_cruncher->max_window_size = (user_set_limit ? user_set_limit : x_windows_limit)
// - ((num_cruncher->border * 2) * num_cruncher->maxZF);
{
GdkScreen
*
screen
;
double
width_pixels
,
height_pixels
,
width_mm
,
height_mm
;
screen
=
gdk_screen_get_default
()
;
width_pixels
=
(
double
)
gdk_screen_get_width
(
screen
)
;
height_pixels
=
(
double
)
gdk_screen_get_height
(
screen
)
;
width_mm
=
(
double
)
gdk_screen_get_width_mm
(
screen
)
;
height_mm
=
(
double
)
gdk_screen_get_height_mm
(
screen
)
;
num_cruncher
->
pix2mmy
=
height_pixels
/
height_mm
;
num_cruncher
->
pix2mmx
=
width_pixels
/
width_mm
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
printf
(
"stop here
\n
"
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
}
return
num_cruncher
;
}
...
...
This diff is collapsed.
Click to expand it.
src/zmapWindow/zmapWindowZoomControl_P.h
+
8
−
3
View file @
4ae21d78
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Oct
17
09:00
200
7
(edgrif)
* Last edited:
Mar
17
12:21
200
9
(edgrif)
* Created: Tue Jul 12 16:02:52 2005 (rds)
* CVS info: $Id: zmapWindowZoomControl_P.h,v 1.
8
200
7-10
-17 15:5
3:05
edgrif Exp $
* CVS info: $Id: zmapWindowZoomControl_P.h,v 1.
9
200
9-03
-17 15:5
2:20
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -59,13 +59,18 @@ enum {
typedef
struct
_ZMapWindowZoomControlStruct
{
ZMapMagic
magic
;
double
zF
;
double
minZF
;
double
maxZF
;
double
textHeight
;
double
textWidth
;
double
max_window_size
;
double
pix2mmy
;
/* Convert pixels -> screen mm. */
double
pix2mmx
;
/* Convert pixels -> screen mm. */
double
max_window_size
;
int
border
;
PangoFontDescription
*
font_desc
;
...
...
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