Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
b987fdf8
Commit
b987fdf8
authored
Dec 04, 2019
by
pwrd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flow, zoom didn't redraw and work area rectangle wasn't displayed in gtk
parent
7ea6601f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
xtt/lib/flow/gtk/flow_draw_gtk.cpp
xtt/lib/flow/gtk/flow_draw_gtk.cpp
+3
-0
xtt/lib/flow/src/flow_ctx.cpp
xtt/lib/flow/src/flow_ctx.cpp
+15
-10
No files found.
xtt/lib/flow/gtk/flow_draw_gtk.cpp
View file @
b987fdf8
...
@@ -1002,6 +1002,9 @@ void FlowDrawGtk::set_dirty(void *wind) {
...
@@ -1002,6 +1002,9 @@ void FlowDrawGtk::set_dirty(void *wind) {
void
FlowDrawGtk
::
rect
(
int
x
,
int
y
,
int
width
,
int
height
,
void
FlowDrawGtk
::
rect
(
int
x
,
int
y
,
int
width
,
int
height
,
flow_eDrawType
gc_type
,
int
fill
,
int
idx
,
int
highlight
,
int
dimmed
)
flow_eDrawType
gc_type
,
int
fill
,
int
idx
,
int
highlight
,
int
dimmed
)
{
{
if
(
width
==
0
||
height
==
0
)
return
;
GdkGC
*
gc
;
GdkGC
*
gc
;
if
(
gc_type
==
flow_eDrawType_Green
)
{
if
(
gc_type
==
flow_eDrawType_Green
)
{
gc
=
gc_green
;
gc
=
gc_green
;
...
...
xtt/lib/flow/src/flow_ctx.cpp
View file @
b987fdf8
...
@@ -445,6 +445,7 @@ void FlowCtx::zoom(double factor)
...
@@ -445,6 +445,7 @@ void FlowCtx::zoom(double factor)
=
int
((
offset_y
-
window_height
/
2.0
*
(
1.0
/
factor
-
1
))
*
factor
);
=
int
((
offset_y
-
window_height
/
2.0
*
(
1.0
/
factor
-
1
))
*
factor
);
a
.
zoom
();
a
.
zoom
();
nav_zoom
();
nav_zoom
();
set_dirty
();
change_scrollbar
();
change_scrollbar
();
}
}
...
@@ -788,6 +789,7 @@ void FlowCtx::nav_draw(int ll_x, int ll_y, int ur_x, int ur_y)
...
@@ -788,6 +789,7 @@ void FlowCtx::nav_draw(int ll_x, int ll_y, int ur_x, int ur_y)
a
.
a
[
i
]
->
nav_draw
(
ll_x
,
ll_y
,
ur_x
,
ur_y
);
a
.
a
[
i
]
->
nav_draw
(
ll_x
,
ll_y
,
ur_x
,
ur_y
);
}
}
if
(
window_width
!=
0
&&
window_height
!=
0
)
{
nav_rect_ll_x
=
int
(
nav_zoom_factor
*
offset_x
/
zoom_factor
-
nav_offset_x
);
nav_rect_ll_x
=
int
(
nav_zoom_factor
*
offset_x
/
zoom_factor
-
nav_offset_x
);
nav_rect_ur_x
=
int
(
nav_rect_ur_x
=
int
(
nav_zoom_factor
*
(
offset_x
+
window_width
)
/
zoom_factor
-
nav_offset_x
);
nav_zoom_factor
*
(
offset_x
+
window_width
)
/
zoom_factor
-
nav_offset_x
);
...
@@ -797,6 +799,7 @@ void FlowCtx::nav_draw(int ll_x, int ll_y, int ur_x, int ur_y)
...
@@ -797,6 +799,7 @@ void FlowCtx::nav_draw(int ll_x, int ll_y, int ur_x, int ur_y)
fdraw
->
rect
(
nav_rect_ll_x
,
nav_rect_ll_y
,
nav_rect_ur_x
-
nav_rect_ll_x
,
fdraw
->
rect
(
nav_rect_ll_x
,
nav_rect_ll_y
,
nav_rect_ur_x
-
nav_rect_ll_x
,
nav_rect_ur_y
-
nav_rect_ll_y
,
flow_eDrawType_Line
,
0
,
0
);
nav_rect_ur_y
-
nav_rect_ll_y
,
flow_eDrawType_Line
,
0
,
0
);
}
}
}
void
FlowCtx
::
find_grid
(
double
x
,
double
y
,
double
*
x_grid
,
double
*
y_grid
)
void
FlowCtx
::
find_grid
(
double
x
,
double
y
,
double
*
x_grid
,
double
*
y_grid
)
...
@@ -1233,10 +1236,12 @@ int FlowCtx::event_handler_nav(flow_eEvent event, int x, int y)
...
@@ -1233,10 +1236,12 @@ int FlowCtx::event_handler_nav(flow_eEvent event, int x, int y)
}
}
}
}
break
;
break
;
case
flow_eEvent_Exposure
:
case
flow_eEvent_Exposure
:
{
fdraw
->
get_window_size
(
navw
,
&
nav_window_width
,
&
nav_window_height
);
fdraw
->
get_window_size
(
navw
,
&
nav_window_width
,
&
nav_window_height
);
fdraw
->
get_window_size
(
mw
,
&
window_width
,
&
window_height
);
nav_zoom
();
nav_zoom
();
break
;
break
;
}
case
flow_eEvent_ButtonMotion
:
case
flow_eEvent_ButtonMotion
:
if
(
nav_rect_movement_active
)
{
if
(
nav_rect_movement_active
)
{
int
delta_x
=
x
-
nav_rect_move_last_x
;
int
delta_x
=
x
-
nav_rect_move_last_x
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment