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
43473b1d
Commit
43473b1d
authored
Mar 07, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed selective redrawing: This should fix those rendering artifacts.
parent
d08e0554
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
15 additions
and
426 deletions
+15
-426
xtt/lib/flow/gtk/flow_draw_gtk.cpp
xtt/lib/flow/gtk/flow_draw_gtk.cpp
+0
-42
xtt/lib/flow/gtk/flow_draw_gtk.h
xtt/lib/flow/gtk/flow_draw_gtk.h
+0
-1
xtt/lib/flow/qt/flow_draw_qt.cqt
xtt/lib/flow/qt/flow_draw_qt.cqt
+0
-51
xtt/lib/flow/qt/flow_draw_qt.h
xtt/lib/flow/qt/flow_draw_qt.h
+0
-2
xtt/lib/flow/src/flow_ctx.cpp
xtt/lib/flow/src/flow_ctx.cpp
+6
-64
xtt/lib/flow/src/flow_draw.cpp
xtt/lib/flow/src/flow_draw.cpp
+0
-4
xtt/lib/flow/src/flow_draw.h
xtt/lib/flow/src/flow_draw.h
+0
-1
xtt/lib/glow/gtk/glow_draw_gtk.cpp
xtt/lib/glow/gtk/glow_draw_gtk.cpp
+0
-97
xtt/lib/glow/gtk/glow_draw_gtk.h
xtt/lib/glow/gtk/glow_draw_gtk.h
+0
-1
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+0
-57
xtt/lib/glow/qt/glow_draw_qt.h
xtt/lib/glow/qt/glow_draw_qt.h
+0
-1
xtt/lib/glow/src/glow_ctx.cpp
xtt/lib/glow/src/glow_ctx.cpp
+6
-68
xtt/lib/glow/src/glow_curvectx.cpp
xtt/lib/glow/src/glow_curvectx.cpp
+3
-32
xtt/lib/glow/src/glow_draw.cpp
xtt/lib/glow/src/glow_draw.cpp
+0
-4
xtt/lib/glow/src/glow_draw.h
xtt/lib/glow/src/glow_draw.h
+0
-1
No files found.
xtt/lib/flow/gtk/flow_draw_gtk.cpp
View file @
43473b1d
...
...
@@ -1853,48 +1853,6 @@ int FlowDrawGtk::get_text_extent_pango(FlowCtx* ctx, const char* text, int len,
return
1
;
}
void
FlowDrawGtk
::
copy_area
(
FlowCtx
*
ctx
,
int
x
,
int
y
)
{
GdkGC
*
gc
;
if
(
ctx
->
nodraw
)
return
;
gc
=
gcs
[
flow_eDrawType_Line
][
3
];
if
(
x
>=
0
&&
y
>=
0
)
{
gdk_draw_drawable
(
window
,
gc
,
window
,
0
,
0
,
x
,
y
,
ctx
->
window_width
-
x
,
ctx
->
window_height
-
y
);
if
(
x
)
gdk_window_clear_area
(
window
,
0
,
0
,
x
,
ctx
->
window_height
);
if
(
y
)
gdk_window_clear_area
(
window
,
x
,
0
,
ctx
->
window_width
,
y
);
}
else
if
(
x
<=
0
&&
y
<=
0
)
{
gdk_draw_drawable
(
window
,
gc
,
window
,
-
x
,
-
y
,
0
,
0
,
ctx
->
window_width
+
x
,
ctx
->
window_height
+
y
);
if
(
x
)
gdk_window_clear_area
(
window
,
ctx
->
window_width
+
x
,
0
,
ctx
->
window_width
,
ctx
->
window_height
);
if
(
y
)
gdk_window_clear_area
(
window
,
0
,
ctx
->
window_height
+
y
,
ctx
->
window_width
+
x
,
ctx
->
window_height
);
}
else
if
(
x
<=
0
&&
y
>=
0
)
{
gdk_draw_drawable
(
window
,
gc
,
window
,
-
x
,
0
,
0
,
y
,
ctx
->
window_width
+
x
,
ctx
->
window_height
-
y
);
if
(
x
)
gdk_window_clear_area
(
window
,
ctx
->
window_width
+
x
,
0
,
ctx
->
window_width
,
ctx
->
window_height
);
if
(
y
)
gdk_window_clear_area
(
window
,
0
,
0
,
ctx
->
window_width
+
x
,
y
);
}
else
{
gdk_draw_drawable
(
window
,
gc
,
window
,
0
,
-
y
,
x
,
0
,
ctx
->
window_width
-
x
,
ctx
->
window_height
+
y
);
if
(
x
)
gdk_window_clear_area
(
window
,
0
,
0
,
x
,
ctx
->
window_height
);
if
(
y
)
gdk_window_clear_area
(
window
,
x
,
ctx
->
window_height
+
y
,
ctx
->
window_width
,
ctx
->
window_height
);
}
}
void
FlowDrawGtk
::
set_inputfocus
(
FlowCtx
*
ctx
)
{
gdk_window_focus
(((
FlowDrawGtk
*
)
ctx
->
fdraw
)
->
window
,
GDK_CURRENT_TIME
);
...
...
xtt/lib/flow/gtk/flow_draw_gtk.h
View file @
43473b1d
...
...
@@ -162,7 +162,6 @@ public:
void
set_nav_cursor
(
FlowCtx
*
ctx
,
draw_eCursor
cursor
);
int
get_text_extent
(
FlowCtx
*
ctx
,
const
char
*
text
,
int
len
,
flow_eDrawType
gc_type
,
int
idx
,
int
*
width
,
int
*
height
,
double
size
);
void
copy_area
(
FlowCtx
*
ctx
,
int
x
,
int
y
);
int
create_input
(
FlowCtx
*
ctx
,
int
x
,
int
y
,
char
*
text
,
int
len
,
int
idx
,
int
width
,
int
height
,
void
*
node
,
int
number
,
void
**
data
)
{
...
...
xtt/lib/flow/qt/flow_draw_qt.cqt
View file @
43473b1d
...
...
@@ -1604,57 +1604,6 @@ int FlowDrawQt::get_text_extent_pango(FlowCtx* ctx, const char* text, int len,
return 1;
}
void FlowDrawQt::copy_area(FlowCtx* ctx, int x, int y)
{
if (ctx->nodraw) {
return;
}
QPixmap screenShot = QPixmap::grabWidget(window);
unique_ptr<QPainter> painter = get_painter(flow_eDrawType_Line, 3);
if (x >= 0 && y >= 0) {
painter->drawPixmap(
x, y, screenShot, 0, 0, ctx->window_width - x, ctx->window_height - y);
if (x) {
painter->eraseRect(0, 0, x, ctx->window_height);
}
if (y) {
painter->eraseRect(x, 0, ctx->window_width, y);
}
} else if (x <= 0 && y <= 0) {
painter->drawPixmap(0, 0, screenShot, -x, -y, ctx->window_width + x,
ctx->window_height + y);
if (x) {
painter->eraseRect(
ctx->window_width + x, 0, ctx->window_width, ctx->window_height);
}
if (y) {
painter->eraseRect(
0, ctx->window_height + y, ctx->window_width + x, ctx->window_height);
}
} else if (x <= 0 && y >= 0) {
painter->drawPixmap(
0, y, screenShot, -x, 0, ctx->window_width + x, ctx->window_height - y);
if (x) {
painter->eraseRect(
ctx->window_width + x, 0, ctx->window_width, ctx->window_height);
}
if (y) {
painter->eraseRect(0, 0, ctx->window_width + x, y);
}
} else {
painter->drawPixmap(
x, 0, screenShot, 0, -y, ctx->window_width - x, ctx->window_height + y);
if (x) {
painter->eraseRect(0, 0, x, ctx->window_height);
}
if (y) {
painter->eraseRect(
x, ctx->window_height + y, ctx->window_width, ctx->window_height);
}
}
}
void FlowDrawQt::set_inputfocus(FlowCtx* ctx)
{
window->setFocus(Qt::OtherFocusReason);
...
...
xtt/lib/flow/qt/flow_draw_qt.h
View file @
43473b1d
...
...
@@ -174,8 +174,6 @@ public:
int
get_text_extent
(
FlowCtx
*
ctx
,
const
char
*
text
,
int
len
,
flow_eDrawType
gc_type
,
int
idx
,
int
*
width
,
int
*
height
,
double
size
);
void
copy_area
(
FlowCtx
*
ctx
,
int
x
,
int
y
);
int
create_input
(
FlowCtx
*
ctx
,
int
x
,
int
y
,
char
*
text
,
int
len
,
int
idx
,
int
width
,
int
height
,
void
*
node
,
int
number
,
void
**
data
)
{
...
...
xtt/lib/flow/src/flow_ctx.cpp
View file @
43473b1d
...
...
@@ -1450,37 +1450,9 @@ int FlowCtx::event_handler_nav(flow_eEvent event, int x, int y)
offset_y
-=
mainwind_delta_y
;
a
.
traverse
(
mainwind_delta_x
,
mainwind_delta_y
);
fdraw
->
copy_area
(
this
,
mainwind_delta_x
,
mainwind_delta_y
);
// clear();
if
(
!
unobscured
)
draw
(
0
,
0
,
window_width
,
window_height
);
else
{
if
(
mainwind_delta_x
>=
0
&&
mainwind_delta_y
>=
0
)
{
if
(
mainwind_delta_x
)
draw
(
0
,
0
,
mainwind_delta_x
,
window_height
);
if
(
mainwind_delta_y
)
draw
(
mainwind_delta_x
,
0
,
window_width
,
mainwind_delta_y
);
}
else
if
(
mainwind_delta_x
<=
0
&&
mainwind_delta_y
<=
0
)
{
if
(
mainwind_delta_x
)
draw
(
window_width
+
mainwind_delta_x
,
0
,
window_width
,
window_height
);
if
(
mainwind_delta_y
)
draw
(
0
,
window_height
+
mainwind_delta_y
,
window_width
+
mainwind_delta_x
,
window_height
);
}
else
if
(
mainwind_delta_x
<=
0
&&
mainwind_delta_y
>=
0
)
{
if
(
mainwind_delta_x
)
draw
(
window_width
+
mainwind_delta_x
,
0
,
window_width
,
window_height
);
if
(
mainwind_delta_y
)
draw
(
0
,
0
,
window_width
+
mainwind_delta_x
,
mainwind_delta_y
);
}
else
{
if
(
mainwind_delta_x
)
draw
(
0
,
0
,
mainwind_delta_x
,
window_height
);
if
(
mainwind_delta_y
)
draw
(
mainwind_delta_x
,
window_height
+
mainwind_delta_y
,
window_width
,
window_height
);
}
}
clear
();
draw
(
0
,
0
,
window_width
,
window_height
);
change_scrollbar
();
}
else
if
(
nav_rect_zoom_active
)
{
int
delta_x
,
delta_y
;
...
...
@@ -2290,39 +2262,9 @@ void FlowCtx::scroll(int delta_x, int delta_y)
move_widgets
(
delta_x
,
delta_y
);
if
(
window_width
<=
ABS
(
delta_x
)
||
window_height
<=
ABS
(
delta_y
))
{
// Entirely new area
clear
();
draw
(
0
,
0
,
window_width
,
window_height
);
}
else
{
fdraw
->
copy_area
(
this
,
delta_x
,
delta_y
);
if
(
!
unobscured
||
widget_cnt
)
draw
(
0
,
0
,
window_width
,
window_height
);
else
{
if
(
delta_x
>=
0
&&
delta_y
>=
0
)
{
if
(
delta_x
)
draw
(
0
,
0
,
delta_x
,
window_height
);
if
(
delta_y
)
draw
(
delta_x
,
0
,
window_width
,
delta_y
);
}
else
if
(
delta_x
<=
0
&&
delta_y
<=
0
)
{
if
(
delta_x
)
draw
(
window_width
+
delta_x
,
0
,
window_width
,
window_height
);
if
(
delta_y
)
draw
(
0
,
window_height
+
delta_y
,
window_width
+
delta_x
,
window_height
);
}
else
if
(
delta_x
<=
0
&&
delta_y
>=
0
)
{
if
(
delta_x
)
draw
(
window_width
+
delta_x
,
0
,
window_width
,
window_height
);
if
(
delta_y
)
draw
(
0
,
0
,
window_width
+
delta_x
,
delta_y
);
}
else
{
if
(
delta_x
)
draw
(
0
,
0
,
delta_x
,
window_height
);
if
(
delta_y
)
draw
(
delta_x
,
window_height
+
delta_y
,
window_width
,
window_height
);
}
}
}
clear
();
draw
(
0
,
0
,
window_width
,
window_height
);
nav_clear
();
nav_draw
(
0
,
0
,
nav_window_width
,
nav_window_height
);
}
...
...
xtt/lib/flow/src/flow_draw.cpp
View file @
43473b1d
...
...
@@ -311,10 +311,6 @@ int FlowDraw::get_text_extent(FlowCtx* ctx, const char* text, int len,
return
1
;
}
void
FlowDraw
::
copy_area
(
FlowCtx
*
ctx
,
int
x
,
int
y
)
{
}
int
FlowDraw
::
create_input
(
FlowCtx
*
ctx
,
int
x
,
int
y
,
char
*
text
,
int
len
,
int
idx
,
int
width
,
int
height
,
void
*
node
,
int
number
,
void
**
data
)
{
...
...
xtt/lib/flow/src/flow_draw.h
View file @
43473b1d
...
...
@@ -143,7 +143,6 @@ public:
virtual
void
set_nav_cursor
(
FlowCtx
*
ctx
,
draw_eCursor
cursor
);
virtual
int
get_text_extent
(
FlowCtx
*
ctx
,
const
char
*
text
,
int
len
,
flow_eDrawType
gc_type
,
int
idx
,
int
*
width
,
int
*
height
,
double
size
);
virtual
void
copy_area
(
FlowCtx
*
ctx
,
int
x
,
int
y
);
virtual
int
create_input
(
FlowCtx
*
ctx
,
int
x
,
int
y
,
char
*
text
,
int
len
,
int
idx
,
int
width
,
int
height
,
void
*
node
,
int
number
,
void
**
data
);
virtual
int
close_input
(
FlowCtx
*
ctx
,
void
*
data
);
...
...
xtt/lib/glow/gtk/glow_draw_gtk.cpp
View file @
43473b1d
...
...
@@ -2145,103 +2145,6 @@ int GlowDrawGtk::get_text_extent(const char* text, int len,
return
1
;
}
void
GlowDrawGtk
::
copy_area
(
GlowWind
*
wind
,
int
x
,
int
y
)
{
DrawWindGtk
*
w
=
(
DrawWindGtk
*
)
wind
->
window
;
GdkGC
*
gc
;
if
(
ctx
->
nodraw
)
return
;
int
window_width
,
window_height
;
if
(
&
ctx
->
mw
==
wind
)
{
window_width
=
ctx
->
mw
.
window_width
;
window_height
=
ctx
->
mw
.
window_height
;
}
else
{
window_width
=
ctx
->
navw
.
window_width
;
window_height
=
ctx
->
navw
.
window_height
;
}
gc
=
get_gc
(
this
,
glow_eDrawType_Line
,
3
);
if
(
x
>=
0
&&
y
>=
0
)
{
gdk_draw_drawable
(
w
->
window
,
gc
,
w
->
window
,
0
,
0
,
x
,
y
,
window_width
-
x
,
window_height
-
y
);
if
(
!
w
->
double_buffer_on
)
{
if
(
x
)
gdk_window_clear_area
(
w
->
window
,
0
,
0
,
x
,
window_height
);
if
(
y
)
gdk_window_clear_area
(
w
->
window
,
x
,
0
,
window_width
,
y
);
}
else
{
gdk_draw_drawable
(
w
->
buffer
,
gc
,
w
->
buffer
,
0
,
0
,
x
,
y
,
window_width
-
x
,
window_height
-
y
);
if
(
x
)
gdk_draw_rectangle
(
w
->
buffer
,
get_gc
(
this
,
glow_eDrawType_LineErase
,
0
),
1
,
0
,
0
,
x
,
window_height
);
if
(
y
)
gdk_draw_rectangle
(
w
->
buffer
,
get_gc
(
this
,
glow_eDrawType_LineErase
,
0
),
1
,
x
,
0
,
window_width
,
y
);
}
}
else
if
(
x
<=
0
&&
y
<=
0
)
{
gdk_draw_drawable
(
w
->
window
,
gc
,
w
->
window
,
-
x
,
-
y
,
0
,
0
,
window_width
+
x
,
window_height
+
y
);
if
(
!
w
->
double_buffer_on
)
{
if
(
x
)
gdk_window_clear_area
(
w
->
window
,
window_width
+
x
,
0
,
window_width
,
window_height
);
if
(
y
)
gdk_window_clear_area
(
w
->
window
,
0
,
window_height
+
y
,
window_width
+
x
,
window_height
);
}
else
{
gdk_draw_drawable
(
w
->
buffer
,
gc
,
w
->
buffer
,
-
x
,
-
y
,
0
,
0
,
window_width
+
x
,
window_height
+
y
);
if
(
x
)
gdk_draw_rectangle
(
w
->
buffer
,
get_gc
(
this
,
glow_eDrawType_LineErase
,
0
),
1
,
window_width
+
x
,
0
,
-
x
,
window_height
);
if
(
y
)
gdk_draw_rectangle
(
w
->
buffer
,
get_gc
(
this
,
glow_eDrawType_LineErase
,
0
),
1
,
0
,
window_height
+
y
,
window_width
+
x
,
-
y
);
}
}
else
if
(
x
<=
0
&&
y
>=
0
)
{
gdk_draw_drawable
(
w
->
window
,
gc
,
w
->
window
,
-
x
,
0
,
0
,
y
,
window_width
+
x
,
window_height
-
y
);
if
(
!
w
->
double_buffer_on
)
{
if
(
x
)
gdk_window_clear_area
(
w
->
window
,
window_width
+
x
,
0
,
window_width
,
window_height
);
if
(
y
)
gdk_window_clear_area
(
w
->
window
,
0
,
0
,
window_width
+
x
,
y
);
}
else
{
gdk_draw_drawable
(
w
->
buffer
,
gc
,
w
->
buffer
,
-
x
,
0
,
0
,
y
,
window_width
+
x
,
window_height
-
y
);
if
(
x
)
gdk_draw_rectangle
(
w
->
buffer
,
get_gc
(
this
,
glow_eDrawType_LineErase
,
0
),
1
,
window_width
+
x
,
0
,
-
x
,
window_height
);
if
(
y
)
gdk_draw_rectangle
(
w
->
buffer
,
get_gc
(
this
,
glow_eDrawType_LineErase
,
0
),
1
,
0
,
0
,
window_width
+
x
,
y
);
}
}
else
// x > 0 && y < 0
{
gdk_draw_drawable
(
w
->
window
,
gc
,
w
->
window
,
0
,
-
y
,
x
,
0
,
window_width
-
x
,
window_height
+
y
);
if
(
!
w
->
double_buffer_on
)
{
if
(
x
)
gdk_window_clear_area
(
w
->
window
,
0
,
0
,
x
,
window_height
);
if
(
y
)
gdk_window_clear_area
(
w
->
window
,
x
,
window_height
+
y
,
window_width
,
window_height
);
}
else
{
gdk_draw_drawable
(
w
->
buffer
,
gc
,
w
->
buffer
,
0
,
-
y
,
x
,
0
,
window_width
-
x
,
window_height
+
y
);
if
(
x
)
gdk_draw_rectangle
(
w
->
buffer
,
get_gc
(
this
,
glow_eDrawType_LineErase
,
0
),
1
,
0
,
0
,
x
,
window_height
);
if
(
y
)
gdk_draw_rectangle
(
w
->
buffer
,
get_gc
(
this
,
glow_eDrawType_LineErase
,
0
),
1
,
x
,
window_height
+
y
,
window_width
-
x
,
-
y
);
}
}
}
void
GlowDrawGtk
::
set_inputfocus
(
GlowWind
*
wind
)
{
DrawWindGtk
*
w
=
(
DrawWindGtk
*
)
wind
->
window
;
...
...
xtt/lib/glow/gtk/glow_draw_gtk.h
View file @
43473b1d
...
...
@@ -163,7 +163,6 @@ public:
virtual
int
get_text_extent
(
const
char
*
text
,
int
len
,
glow_eDrawType
gc_type
,
int
idx
,
glow_eFont
font_idx
,
int
*
width
,
int
*
height
,
int
*
descent
,
double
size
,
int
rot
);
virtual
void
copy_area
(
GlowWind
*
w
,
int
x
,
int
y
);
virtual
void
set_inputfocus
(
GlowWind
*
w
);
virtual
void
set_background
(
GlowWind
*
w
,
glow_eDrawType
drawtype
,
glow_tPixmap
pixmap
,
glow_tImImage
image
,
int
pixmap_width
,
...
...
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
43473b1d
...
...
@@ -1610,63 +1610,6 @@ int GlowDrawQt::get_text_extent(const char* text, int len,
return 1;
}
void GlowDrawQt::copy_area(GlowWind* wind, int x, int y)
{
DrawWindQt* w = (DrawWindQt*)wind->window;
if (ctx->nodraw) {
return;
}
int window_width, window_height;
if (&ctx->mw == wind) {
window_width = ctx->mw.window_width;
window_height = ctx->mw.window_height;
} else {
window_width = ctx->navw.window_width;
window_height = ctx->navw.window_height;
}
unique_ptr<QPainter> painterBuffer
= get_painter(w->buffer, this, glow_eDrawType_Line, 3);
if (x >= 0 && y >= 0) {
painterBuffer->drawImage(
x, y, *(w->buffer), 0, 0, window_width - x, window_height - y);
if (x) {
painterBuffer->eraseRect(0, 0, x, window_height);
}
if (y) {
painterBuffer->eraseRect(x, 0, window_width, y);
}
} else if (x <= 0 && y <= 0) {
painterBuffer->drawImage(
0, 0, *(w->buffer), -x, -y, window_width + x, window_height + y);
if (x) {
painterBuffer->eraseRect(window_width + x, 0, -x, window_height);
}
if (y) {
painterBuffer->eraseRect(0, window_height + y, window_width + x, -y);
}
} else if (x <= 0 && y >= 0) {
painterBuffer->drawImage(
0, y, *(w->buffer), -x, 0, window_width + x, window_height - y);
if (x) {
painterBuffer->eraseRect(window_width + x, 0, -x, window_height);
}
if (y) {
painterBuffer->eraseRect(0, 0, window_width + x, y);
}
} else { // x > 0 && y < 0
painterBuffer->drawImage(
x, 0, *(w->buffer), 0, -y, window_width - x, window_height + y);
if (x) {
painterBuffer->eraseRect(0, 0, x, window_height);
}
if (y) {
painterBuffer->eraseRect(x, window_height + y, window_width - x, -y);
}
}
}
void GlowDrawQt::set_inputfocus(GlowWind* wind)
{
DrawWindQt* w = (DrawWindQt*)wind->window;
...
...
xtt/lib/glow/qt/glow_draw_qt.h
View file @
43473b1d
...
...
@@ -167,7 +167,6 @@ public:
virtual
int
get_text_extent
(
const
char
*
text
,
int
len
,
glow_eDrawType
painter_type
,
int
idx
,
glow_eFont
font_idx
,
int
*
width
,
int
*
height
,
int
*
descent
,
double
size
,
int
rot
);
virtual
void
copy_area
(
GlowWind
*
w
,
int
x
,
int
y
);
virtual
void
set_inputfocus
(
GlowWind
*
w
);
virtual
void
set_background
(
GlowWind
*
w
,
glow_eDrawType
drawtype
,
glow_tPixmap
pixmap
,
glow_tImImage
image
,
int
pixmap_width
,
...
...
xtt/lib/glow/src/glow_ctx.cpp
View file @
43473b1d
...
...
@@ -1507,38 +1507,9 @@ int GlowCtx::event_handler_nav(glow_eEvent event, int x, int y)
((
GrowCtx
*
)
this
)
->
polyline_last_end_y
+=
mainwind_delta_y
;
}
gdraw
->
copy_area
(
&
mw
,
mainwind_delta_x
,
mainwind_delta_y
);
// clear();
if
(
!
unobscured
)
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
,
mw
.
window_height
);
else
{
if
(
mainwind_delta_x
>=
0
&&
mainwind_delta_y
>=
0
)
{
if
(
mainwind_delta_x
)
draw
(
&
mw
,
0
,
0
,
mainwind_delta_x
,
mw
.
window_height
);
if
(
mainwind_delta_y
)
draw
(
&
mw
,
mainwind_delta_x
,
0
,
mw
.
window_width
,
mainwind_delta_y
);
}
else
if
(
mainwind_delta_x
<=
0
&&
mainwind_delta_y
<=
0
)
{
if
(
mainwind_delta_x
)
draw
(
&
mw
,
mw
.
window_width
+
mainwind_delta_x
,
0
,
mw
.
window_width
,
mw
.
window_height
);
if
(
mainwind_delta_y
)
draw
(
&
mw
,
0
,
mw
.
window_height
+
mainwind_delta_y
,
mw
.
window_width
+
mainwind_delta_x
,
mw
.
window_height
);
}
else
if
(
mainwind_delta_x
<=
0
&&
mainwind_delta_y
>=
0
)
{
if
(
mainwind_delta_x
)
draw
(
&
mw
,
mw
.
window_width
+
mainwind_delta_x
,
0
,
mw
.
window_width
,
mw
.
window_height
);
if
(
mainwind_delta_y
)
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
+
mainwind_delta_x
,
mainwind_delta_y
);
}
else
{
if
(
mainwind_delta_x
)
draw
(
&
mw
,
0
,
0
,
mainwind_delta_x
,
mw
.
window_height
);
if
(
mainwind_delta_y
)
draw
(
&
mw
,
mainwind_delta_x
,
mw
.
window_height
+
mainwind_delta_y
,
mw
.
window_width
,
mw
.
window_height
);
}
}
clear
(
&
mw
);
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
,
mw
.
window_height
);
change_scrollbar
();
}
else
if
(
nav_rect_zoom_active
)
{
int
delta_x
,
delta_y
;
...
...
@@ -2083,42 +2054,9 @@ void GlowCtx::scroll(int delta_x, int delta_y)
move_widgets
(
delta_x
,
delta_y
);
if
(
mw
.
window_width
<=
ABS
(
delta_x
)
||
mw
.
window_height
<=
ABS
(
delta_y
))
{
// Entirely new area
clear
(
&
mw
);
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
,
mw
.
window_height
);
}
else
{
gdraw
->
copy_area
(
&
mw
,
delta_x
,
delta_y
);
if
(
!
unobscured
||
widget_cnt
)
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
,
mw
.
window_height
);
else
{
if
(
delta_x
>=
0
&&
delta_y
>=
0
)
{
if
(
delta_x
)
draw
(
&
mw
,
0
,
0
,
delta_x
,
mw
.
window_height
);
if
(
delta_y
)
draw
(
&
mw
,
delta_x
,
0
,
mw
.
window_width
,
delta_y
);
}
else
if
(
delta_x
<=
0
&&
delta_y
<=
0
)
{
if
(
delta_x
)
draw
(
&
mw
,
mw
.
window_width
+
delta_x
,
0
,
mw
.
window_width
,
mw
.
window_height
);
if
(
delta_y
)
draw
(
&
mw
,
0
,
mw
.
window_height
+
delta_y
,
mw
.
window_width
+
delta_x
,
mw
.
window_height
);
}
else
if
(
delta_x
<=
0
&&
delta_y
>=
0
)
{
if
(
delta_x
)
draw
(
&
mw
,
mw
.
window_width
+
delta_x
,
0
,
mw
.
window_width
,
mw
.
window_height
);
if
(
delta_y
)
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
+
delta_x
,
delta_y
);
}
else
{
if
(
delta_x
)
draw
(
&
mw
,
0
,
0
,
delta_x
,
mw
.
window_height
);
if
(
delta_y
)
draw
(
&
mw
,
delta_x
,
mw
.
window_height
+
delta_y
,
mw
.
window_width
,
mw
.
window_height
);
}
}
}
clear
(
&
mw
);
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
,
mw
.
window_height
);
clear
(
&
navw
);
draw
(
&
navw
,
0
,
0
,
navw
.
window_width
,
navw
.
window_height
);
if
(
ctx_type
==
glow_eCtxType_Grow
)
{
...
...
xtt/lib/glow/src/glow_curvectx.cpp
View file @
43473b1d
...
...
@@ -225,38 +225,9 @@ int CurveCtx::event_handler_nav(glow_eEvent event, int x, int y)
((
GrowCtx
*
)
this
)
->
polyline_last_end_y
+=
mainwind_delta_y
;
}
gdraw
->
copy_area
(
&
mw
,
mainwind_delta_x
,
mainwind_delta_y
);
// clear();
if
(
!
unobscured
)
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
,
mw
.
window_height
);
else
{
if
(
mainwind_delta_x
>=
0
&&
mainwind_delta_y
>=
0
)
{
if
(
mainwind_delta_x
)
draw
(
&
mw
,
0
,
0
,
mainwind_delta_x
,
mw
.
window_height
);
if
(
mainwind_delta_y
)
draw
(
&
mw
,
mainwind_delta_x
,
0
,
mw
.
window_width
,
mainwind_delta_y
);
}
else
if
(
mainwind_delta_x
<=
0
&&
mainwind_delta_y
<=
0
)
{
if
(
mainwind_delta_x
)
draw
(
&
mw
,
mw
.
window_width
+
mainwind_delta_x
,
0
,
mw
.
window_width
,
mw
.
window_height
);
if
(
mainwind_delta_y
)
draw
(
&
mw
,
0
,
mw
.
window_height
+
mainwind_delta_y
,
mw
.
window_width
+
mainwind_delta_x
,
mw
.
window_height
);
}
else
if
(
mainwind_delta_x
<=
0
&&
mainwind_delta_y
>=
0
)
{
if
(
mainwind_delta_x
)
draw
(
&
mw
,
mw
.
window_width
+
mainwind_delta_x
,
0
,
mw
.
window_width
,
mw
.
window_height
);
if
(
mainwind_delta_y
)
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
+
mainwind_delta_x
,
mainwind_delta_y
);
}
else
{
if
(
mainwind_delta_x
)
draw
(
&
mw
,
0
,
0
,
mainwind_delta_x
,
mw
.
window_height
);
if
(
mainwind_delta_y
)
draw
(
&
mw
,
mainwind_delta_x
,
mw
.
window_height
+
mainwind_delta_y
,
mw
.
window_width
,
mw
.
window_height
);
}
}
clear
(
&
mw
);
draw
(
&
mw
,
0
,
0
,
mw
.
window_width
,
mw
.
window_height
);
change_scrollbar
();
}
else
if
(
nav_rect_zoom_active
)
{
int
delta_x
,
delta_y
;
...
...
xtt/lib/glow/src/glow_draw.cpp
View file @
43473b1d
...
...
@@ -226,10 +226,6 @@ int GlowDraw::get_text_extent(const char* text, int len, glow_eDrawType gc_type,
return
1
;
}
void
GlowDraw
::
copy_area
(
GlowWind
*
w
,
int
x
,
int
y
)
{
}
void
GlowDraw
::
set_inputfocus
(
GlowWind
*
w
)
{
}
...
...
xtt/lib/glow/src/glow_draw.h
View file @
43473b1d
...
...
@@ -115,7 +115,6 @@ public:
virtual
int
get_text_extent
(
const
char
*
text
,
int
len
,
glow_eDrawType
gc_type
,
int
idx
,
glow_eFont
font_idx
,
int
*
width
,
int
*
height
,
int
*
descent
,
double
size
,
int
rot
);
virtual
void
copy_area
(
GlowWind
*
w
,
int
x
,
int
y
);
virtual
void
set_inputfocus
(
GlowWind
*
w
);
virtual
void
set_background
(
GlowWind
*
w
,
glow_eDrawType
drawtype
,
glow_tPixmap
pixmap
,
glow_tImImage
image
,
int
pixmap_width
,
...
...
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