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
b1020a09
Commit
b1020a09
authored
Aug 20, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grid draw improved
parent
fcc540de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
+21
-9
xtt/lib/glow/gtk/glow_draw_gtk.cpp
xtt/lib/glow/gtk/glow_draw_gtk.cpp
+6
-2
xtt/lib/glow/motif/glow_draw_xlib.cpp
xtt/lib/glow/motif/glow_draw_xlib.cpp
+6
-2
xtt/lib/glow/src/glow_ctx.cpp
xtt/lib/glow/src/glow_ctx.cpp
+9
-5
No files found.
xtt/lib/glow/gtk/glow_draw_gtk.cpp
View file @
b1020a09
/*
* Proview $Id: glow_draw_gtk.cpp,v 1.
6 2007-07-17 12:43:42
claes Exp $
* Proview $Id: glow_draw_gtk.cpp,v 1.
7 2007-08-20 08:23:16
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -2295,6 +2295,10 @@ int GlowDrawGtk::draw_points( GlowWind *wind, glow_sPointX *points, int point_nu
gdk_draw_points
(
w
->
window
,
get_gc
(
this
,
gc_type
,
0
),
gpoints
,
point_num
);
if
(
w
->
double_buffer_on
)
gdk_draw_points
(
w
->
buffer
,
get_gc
(
this
,
gc_type
,
0
),
gpoints
,
point_num
);
free
(
gpoints
);
if
(
w
->
clip_on
)
...
...
@@ -2504,7 +2508,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.
6 2007-07-17 12:43:42
claes Exp $ Glow"
<<
endl
<<
"%%Creator: Proview $Id: glow_draw_gtk.cpp,v 1.
7 2007-08-20 08:23:16
claes Exp $ Glow"
<<
endl
<<
"%%EndComments"
<<
endl
<<
endl
;
}
else
...
...
xtt/lib/glow/motif/glow_draw_xlib.cpp
View file @
b1020a09
/*
* Proview $Id: glow_draw_xlib.cpp,v 1.
6 2007-07-17 12:53:31
claes Exp $
* Proview $Id: glow_draw_xlib.cpp,v 1.
7 2007-08-20 08:23:16
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -2480,6 +2480,10 @@ int GlowDrawXLib::draw_points( GlowWind *wind, glow_sPointX *points, int point_n
XDrawPoints
(
display
,
w
->
window
,
get_gc
(
this
,
gc_type
,
0
),
(
XPoint
*
)
points
,
point_num
,
CoordModeOrigin
);
if
(
w
->
double_buffer_on
)
XDrawPoints
(
display
,
w
->
buffer
,
get_gc
(
this
,
gc_type
,
0
),
(
XPoint
*
)
points
,
point_num
,
CoordModeOrigin
);
if
(
w
->
clip_on
)
reset_clip
(
w
,
get_gc
(
this
,
gc_type
,
0
));
...
...
@@ -2716,7 +2720,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.
6 2007-07-17 12:53:31
claes Exp $ Glow"
<<
endl
<<
"%%Creator: Proview $Id: glow_draw_xlib.cpp,v 1.
7 2007-08-20 08:23:16
claes Exp $ Glow"
<<
endl
<<
"%%EndComments"
<<
endl
<<
endl
;
}
else
...
...
xtt/lib/glow/src/glow_ctx.cpp
View file @
b1020a09
/*
* Proview $Id: glow_ctx.cpp,v 1.1
7 2007-07-18 13:16:58
claes Exp $
* Proview $Id: glow_ctx.cpp,v 1.1
8 2007-08-20 08:23:16
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -2061,7 +2061,7 @@ void GlowCtx::scroll( int delta_x, int delta_y)
void
GlowCtx
::
draw_grid
(
GlowWind
*
w
,
int
ll_x
,
int
ll_y
,
int
ur_x
,
int
ur_y
)
{
int
x
,
y
,
x
0
,
x1
,
y0
,
y1
,
i
,
j
;
int
x0
,
x1
,
y0
,
y1
,
i
,
j
;
int
point_num
;
x0
=
int
(
(
ll_x
+
mw
.
offset_x
)
/
mw
.
zoom_factor_x
/
grid_size_x
);
...
...
@@ -2078,13 +2078,17 @@ void GlowCtx::draw_grid( GlowWind *w, int ll_x, int ll_y, int ur_x, int ur_y)
if
(
point_num
<=
0
||
point_num
>=
250000
)
return
;
glow_sPointX
*
p
=
(
glow_sPointX
*
)
calloc
(
point_num
,
sizeof
(
glow_sPointX
));
int
idx
=
0
;
for
(
i
=
x0
;
i
<=
x1
;
i
++
)
{
for
(
j
=
y0
;
j
<=
y1
;
j
++
)
{
x
=
int
(
grid_size_x
*
i
*
mw
.
zoom_factor_x
)
-
mw
.
offset_x
;
y
=
int
(
grid_size_y
*
j
*
mw
.
zoom_factor_y
)
-
mw
.
offset_y
;
gdraw
->
draw_point
(
&
mw
,
x
,
y
,
glow_eDrawType_Line
)
;
p
[
idx
].
x
=
int
(
grid_size_x
*
i
*
mw
.
zoom_factor_x
)
-
mw
.
offset_x
;
p
[
idx
].
y
=
int
(
grid_size_y
*
j
*
mw
.
zoom_factor_y
)
-
mw
.
offset_y
;
idx
++
;
}
}
gdraw
->
draw_points
(
&
mw
,
p
,
point_num
,
glow_eDrawType_Line
);
free
(
p
);
}
void
GlowCtx
::
set_show_grid
(
int
show
)
...
...
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