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
761f36c7
Commit
761f36c7
authored
Jul 17, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clip and buffer fixes for window objects
parent
0cf1830e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
9 deletions
+43
-9
xtt/lib/glow/gtk/glow_draw_gtk.cpp
xtt/lib/glow/gtk/glow_draw_gtk.cpp
+24
-3
xtt/lib/glow/gtk/glow_draw_gtk.h
xtt/lib/glow/gtk/glow_draw_gtk.h
+2
-1
xtt/lib/glow/motif/glow_draw_xlib.cpp
xtt/lib/glow/motif/glow_draw_xlib.cpp
+13
-2
xtt/lib/glow/motif/glow_draw_xlib.h
xtt/lib/glow/motif/glow_draw_xlib.h
+2
-1
xtt/lib/glow/src/glow_grownode.cpp
xtt/lib/glow/src/glow_grownode.cpp
+2
-2
No files found.
xtt/lib/glow/gtk/glow_draw_gtk.cpp
View file @
761f36c7
/*
* Proview $Id: glow_draw_gtk.cpp,v 1.
5 2007-05-07 14:35:03
claes Exp $
* Proview $Id: glow_draw_gtk.cpp,v 1.
6 2007-07-17 12:43:42
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -506,6 +506,7 @@ GlowDrawGtk::GlowDrawGtk(
memset
(
gcs
,
0
,
sizeof
(
gcs
));
memset
(
font
,
0
,
sizeof
(
font
));
memset
(
cursors
,
0
,
sizeof
(
cursors
));
nav_wind
.
is_nav
=
1
;
if
(
type
==
glow_eCtxType_Brow
)
ctx
=
(
GlowCtx
*
)
new
BrowCtx
(
"Claes context"
,
20
);
...
...
@@ -1772,6 +1773,15 @@ void GlowDrawGtk::copy_buffer( GlowWind *wind,
int
y0
=
min
(
ll_y
,
ur_y
);
int
y1
=
max
(
ll_y
,
ur_y
);
if
(
w
->
clip_cnt
)
{
x0
=
max
(
x0
,
w
->
clip_rectangle
[
w
->
clip_cnt
-
1
].
x
);
y0
=
max
(
y0
,
w
->
clip_rectangle
[
w
->
clip_cnt
-
1
].
y
);
x1
=
min
(
x1
,
w
->
clip_rectangle
[
w
->
clip_cnt
-
1
].
x
+
w
->
clip_rectangle
[
w
->
clip_cnt
-
1
].
width
);
y1
=
min
(
y1
,
w
->
clip_rectangle
[
w
->
clip_cnt
-
1
].
y
+
w
->
clip_rectangle
[
w
->
clip_cnt
-
1
].
height
);
}
gdk_draw_drawable
(
w
->
window
,
get_gc
(
this
,
glow_eDrawType_Line
,
0
),
w
->
buffer
,
...
...
@@ -2309,7 +2319,7 @@ int GlowDrawGtk::create_buffer( GlowWind *wind)
DrawWindGtk
*
w
=
(
DrawWindGtk
*
)
wind
->
window
;
int
window_width
,
window_height
;
if
(
&
ctx
->
mw
==
wind
)
{
if
(
!
w
->
is_nav
)
{
window_width
=
ctx
->
mw
.
window_width
;
window_height
=
ctx
->
mw
.
window_height
;
}
...
...
@@ -2338,6 +2348,17 @@ int GlowDrawGtk::create_buffer( GlowWind *wind)
return
1
;
}
void
GlowDrawGtk
::
delete_buffer
(
GlowWind
*
wind
)
{
DrawWindGtk
*
w
=
(
DrawWindGtk
*
)
wind
->
window
;
if
(
w
->
buffer
)
g_object_unref
(
w
->
buffer
);
w
->
buffer
=
0
;
w
->
buffer_width
=
0
;
w
->
buffer_height
=
0
;
}
void
GlowDrawGtk
::
buffer_background
(
DrawWind
*
wind
)
{
DrawWindGtk
*
w
=
(
DrawWindGtk
*
)
wind
;
...
...
@@ -2483,7 +2504,7 @@ int GlowDrawGtk::print( char *filename, double x0, double x1, int end)
if
(
new_file
)
{
ps
->
fp
<<
"%!PS-Adobe-2.0 EPSF-1.2"
<<
endl
<<
"%%Creator: Proview $Id: glow_draw_gtk.cpp,v 1.
5 2007-05-07 14:35:03
claes Exp $ Glow"
<<
endl
<<
"%%Creator: Proview $Id: glow_draw_gtk.cpp,v 1.
6 2007-07-17 12:43:42
claes Exp $ Glow"
<<
endl
<<
"%%EndComments"
<<
endl
<<
endl
;
}
else
...
...
xtt/lib/glow/gtk/glow_draw_gtk.h
View file @
761f36c7
/*
* Proview $Id: glow_draw_gtk.h,v 1.
3 2007-05-07 14:35:03
claes Exp $
* Proview $Id: glow_draw_gtk.h,v 1.
4 2007-07-17 12:43:42
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -162,6 +162,7 @@ class GlowDrawGtk : public GlowDraw {
virtual
void
set_click_sensitivity
(
GlowWind
*
w
,
int
value
);
virtual
void
draw_background
(
GlowWind
*
w
,
int
x
,
int
y
,
int
w
,
int
h
);
virtual
int
create_buffer
(
GlowWind
*
w
);
virtual
void
delete_buffer
(
GlowWind
*
w
);
virtual
void
buffer_background
(
DrawWind
*
w
);
virtual
int
print
(
char
*
filename
,
double
x0
,
double
x1
,
int
end
);
void
set_clip
(
DrawWind
*
w
,
GdkGC
*
gc
);
...
...
xtt/lib/glow/motif/glow_draw_xlib.cpp
View file @
761f36c7
/*
* Proview $Id: glow_draw_xlib.cpp,v 1.
4 2007-05-07 15:45:18
claes Exp $
* Proview $Id: glow_draw_xlib.cpp,v 1.
5 2007-07-17 12:43:42
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -2560,6 +2560,17 @@ int GlowDrawXLib::create_buffer( GlowWind *wind)
return
1
;
}
void
GlowDrawGtk
::
delete_buffer
(
GlowWind
*
wind
)
{
DrawWindXLib
*
w
=
(
DrawWindXLib
*
)
wind
->
window
;
if
(
w
->
buffer
)
XFreePixmap
(
display
,
w
->
buffer
);
w
->
buffer
=
0
;
w
->
buffer_width
=
0
;
w
->
buffer_height
=
0
;
}
void
GlowDrawXLib
::
buffer_background
(
DrawWind
*
wind
)
{
DrawWindXLib
*
w
=
(
DrawWindXLib
*
)
wind
;
...
...
@@ -2705,7 +2716,7 @@ int GlowDrawXLib::print( char *filename, double x0, double x1, int end)
if
(
new_file
)
{
ps
->
fp
<<
"%!PS-Adobe-2.0 EPSF-1.2"
<<
endl
<<
"%%Creator: Proview $Id: glow_draw_xlib.cpp,v 1.
4 2007-05-07 15:45:18
claes Exp $ Glow"
<<
endl
<<
"%%Creator: Proview $Id: glow_draw_xlib.cpp,v 1.
5 2007-07-17 12:43:42
claes Exp $ Glow"
<<
endl
<<
"%%EndComments"
<<
endl
<<
endl
;
}
else
...
...
xtt/lib/glow/motif/glow_draw_xlib.h
View file @
761f36c7
/*
* Proview $Id: glow_draw_xlib.h,v 1.
4 2007-05-07 15:45:18
claes Exp $
* Proview $Id: glow_draw_xlib.h,v 1.
5 2007-07-17 12:43:42
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -193,6 +193,7 @@ class GlowDrawXLib : public GlowDraw {
virtual
void
set_click_sensitivity
(
GlowWind
*
w
,
int
value
);
virtual
void
draw_background
(
GlowWind
*
w
,
int
x
,
int
y
,
int
w
,
int
h
);
virtual
int
create_buffer
(
GlowWind
*
w
);
virtual
void
delete_buffer
(
GlowWind
*
w
);
virtual
void
buffer_background
(
DrawWind
*
w
);
virtual
int
print
(
char
*
filename
,
double
x0
,
double
x1
,
int
end
);
void
set_clip
(
DrawWind
*
w
,
GC
gc
);
...
...
xtt/lib/glow/src/glow_grownode.cpp
View file @
761f36c7
/*
* Proview $Id: glow_grownode.cpp,v 1.1
4 2007-07-04 13:28:05
claes Exp $
* Proview $Id: glow_grownode.cpp,v 1.1
5 2007-07-17 12:43:42
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1076,7 +1076,7 @@ void GrowNode::draw( GlowWind *w, GlowTransform *t, int highlight, int hot, void
}
else
{
int
x1
,
x2
,
y1
,
y2
,
x_level
,
y_level
;
int
clip_sts
;
int
clip_sts
=
0
;
glow_eDrawTone
old_color_tone
;
glow_eDrawType
old_fill_drawtype
;
...
...
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