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
cda6d78d
Commit
cda6d78d
authored
17 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
Make sure that float groups get destroyed.
Fix for some of the coord space issues and fix for an update issue
parent
ecbc8eeb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
foocanvas/additional_files/foozmap-canvas-floating-group.c
+24
-19
24 additions, 19 deletions
foocanvas/additional_files/foozmap-canvas-floating-group.c
with
24 additions
and
19 deletions
foocanvas/additional_files/foozmap-canvas-floating-group.c
+
24
−
19
View file @
cda6d78d
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Mar
1
3 1
3:04
2008 (rds)
* Last edited: Mar
2
3 1
6:47
2008 (rds)
* Created: Thu Jan 24 08:36:25 2008 (rds)
* CVS info: $Id: foozmap-canvas-floating-group.c,v 1.
2
2008-03-
1
3 1
3:07:17
rds Exp $
* CVS info: $Id: foozmap-canvas-floating-group.c,v 1.
3
2008-03-
2
3 1
6:49:04
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -257,7 +257,9 @@ static void foo_canvas_float_group_get_property(GObject *gobject, guint param_id
static
void
foo_canvas_float_group_destroy
(
GtkObject
*
object
)
{
if
(
GTK_OBJECT_CLASS
(
parent_class_G
)
->
destroy
)
(
*
GTK_OBJECT_CLASS
(
parent_class_G
)
->
destroy
)(
object
);
return
;
}
...
...
@@ -302,18 +304,13 @@ static void foo_canvas_float_group_draw(FooCanvasItem *item,
y1
=
(
double
)((
int
)
y1
);
/* conditionally update the x,y position of the group */
/* This isn't correct. I think we need another set ofproperties
* floating->scr_offset_x & floating->scr_offset_y
* these would record the offset from the scroll region that the
* user wanted.
*/
if
((
floating
->
float_axis
&
ZMAP_FLOAT_AXIS_X
)
&&
(
xpos
!=
x1
))
xpos
=
((
x1
>
floating
->
scr_x1
)
?
(
x1
+
floating
->
scr_x1
)
:
/* should be (x1 + floating->scr_offset_x) see above */
(
x1
)
:
(
double
)((
int
)(
floating
->
scr_x1
)));
if
((
floating
->
float_axis
&
ZMAP_FLOAT_AXIS_Y
)
&&
(
ypos
!=
y1
))
ypos
=
((
y1
>
floating
->
scr_y1
)
?
(
y1
+
floating
->
scr_y1
)
:
/* should be (y1 + floating->scr_offset_y) see above */
(
y1
)
:
(
double
)((
int
)(
floating
->
scr_y1
)));
/* convert back to item coord space */
...
...
@@ -351,17 +348,22 @@ static void foo_canvas_float_group_update(FooCanvasItem *item,
if
(
force_intersect
&&
(
item
->
object
.
flags
&
FOO_CANVAS_ITEM_VISIBLE
))
{
int
cx1
,
cx2
,
cy1
,
cy2
;
foo_canvas_w2c
(
item
->
canvas
,
group
->
scr_x1
,
group
->
scr_y1
,
&
cx1
,
&
cy1
);
foo_canvas_w2c
(
item
->
canvas
,
group
->
scr_x2
,
group
->
scr_y2
,
&
cx2
,
&
cy2
);
/* These must be set in order to make the group intersect with any
* rectangle within the whole of the scroll region */
if
(
group
->
float_axis
&
ZMAP_FLOAT_AXIS_X
)
{
item
->
x1
=
group
->
scr_x1
;
item
->
x2
=
group
->
scr_x2
;
item
->
x1
=
cx1
;
//
group->scr_x1;
item
->
x2
=
cx2
;
//
group->scr_x2;
}
if
(
group
->
float_axis
&
ZMAP_FLOAT_AXIS_Y
)
{
item
->
y
2
=
group
->
scr_y
2
;
item
->
y
1
=
group
->
scr_y
1
;
item
->
y
1
=
cy1
;
//
group->scr_y
1
;
item
->
y
2
=
cy2
;
//
group->scr_y
2
;
}
}
...
...
@@ -369,14 +371,17 @@ static void foo_canvas_float_group_update(FooCanvasItem *item,
if
(
item
->
object
.
flags
&
FOO_CANVAS_ITEM_VISIBLE
)
{
FooCanvasGroup
*
real_group
=
FOO_CANVAS_GROUP
(
item
);
FooCanvasItem
*
i
;
GList
*
list
;
for
(
list
=
real_group
->
item_list
;
list
;
list
=
list
->
next
)
{
if
(
FOO_CANVAS_ITEM_GET_CLASS
(
list
->
data
)
->
update
)
FOO_CANVAS_ITEM_GET_CLASS
(
list
->
data
)
->
update
(
list
->
data
,
i2w_dx
,
i2w_dy
,
flags
);
i
=
list
->
data
;
if
(
FOO_CANVAS_ITEM_GET_CLASS
(
i
)
->
update
)
FOO_CANVAS_ITEM_GET_CLASS
(
i
)
->
update
(
i
,
i2w_dx
,
i2w_dy
,
flags
);
item
->
x1
=
MIN
(
item
->
x1
,
i
->
x1
);
item
->
y1
=
MIN
(
item
->
y1
,
i
->
y1
);
item
->
x2
=
MAX
(
item
->
x2
,
i
->
x2
);
item
->
y2
=
MAX
(
item
->
y2
,
i
->
y2
);
}
}
...
...
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