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
f2690b34
Commit
f2690b34
authored
Dec 07, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imlib removed for motif
parent
00d68f10
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
10 deletions
+40
-10
xtt/lib/flow/motif/flow_draw_xlib.cpp
xtt/lib/flow/motif/flow_draw_xlib.cpp
+10
-0
xtt/lib/flow/motif/flow_draw_xlib.h
xtt/lib/flow/motif/flow_draw_xlib.h
+1
-1
xtt/lib/flow/src/flow_draw.h
xtt/lib/flow/src/flow_draw.h
+0
-4
xtt/lib/glow/motif/glow_draw_xlib.cpp
xtt/lib/glow/motif/glow_draw_xlib.cpp
+28
-0
xtt/lib/glow/motif/glow_draw_xlib.h
xtt/lib/glow/motif/glow_draw_xlib.h
+1
-1
xtt/lib/glow/src/glow_draw.h
xtt/lib/glow/src/glow_draw.h
+0
-4
No files found.
xtt/lib/flow/motif/flow_draw_xlib.cpp
View file @
f2690b34
...
...
@@ -1687,17 +1687,26 @@ void FlowDrawXLib::set_white_background( FlowCtx *ctx)
int
FlowDrawXLib
::
image_get_width
(
flow_tImImage
image
)
{
#if defined IMLIB
return
((
ImlibImage
*
)
image
)
->
rgb_width
;
#else
return
0
;
#endif
}
int
FlowDrawXLib
::
image_get_height
(
flow_tImImage
image
)
{
#if defined IMLIB
return
((
ImlibImage
*
)
image
)
->
rgb_height
;
#else
return
0
;
#endif
}
void
FlowDrawXLib
::
image_scale
(
float
scale
,
flow_tImImage
*
im
,
flow_tPixmap
*
im_pixmap
,
flow_tPixmap
*
im_mask
)
{
#if defined IMLIB
int
current_width
=
int
(
((
ImlibImage
*
)
*
im
)
->
rgb_width
*
scale
);
int
current_height
=
int
(
((
ImlibImage
*
)
*
im
)
->
rgb_height
*
scale
);
...
...
@@ -1707,6 +1716,7 @@ void FlowDrawXLib::image_scale( float scale, flow_tImImage *im, flow_tPixmap *im
Imlib_free_pixmap
(
(
ImlibData
*
)
imlib
,
(
Pixmap
)
*
im_pixmap
);
*
im_pixmap
=
(
flow_tPixmap
)
Imlib_move_image
(
(
ImlibData
*
)
imlib
,
(
ImlibImage
*
)
*
im
);
*
im_mask
=
(
flow_tPixmap
)
Imlib_move_mask
(
(
ImlibData
*
)
imlib
,
(
ImlibImage
*
)
*
im
);
#endif
}
int
FlowDrawXLib
::
image_load
(
const
char
*
imagefile
,
float
scale
,
float
nav_scale
,
...
...
xtt/lib/flow/motif/flow_draw_xlib.h
View file @
f2690b34
...
...
@@ -31,7 +31,7 @@
#include <X11/Xutil.h>
#if defined OS_LINUX
#define IMLIB 1
//
#define IMLIB 1
#endif
#if defined IMLIB
...
...
xtt/lib/flow/src/flow_draw.h
View file @
f2690b34
...
...
@@ -22,10 +22,6 @@
#include <stdlib.h>
#if defined OS_LINUX
#define IMLIB 1
#endif
class
FlowCtx
;
class
FlowDraw
{
...
...
xtt/lib/glow/motif/glow_draw_xlib.cpp
View file @
f2690b34
...
...
@@ -2813,26 +2813,43 @@ x/scalex/width << " " << (y - height*scaley)/scaley/height << " translate" << en
// Image functions
int
GlowDrawXLib
::
image_get_width
(
glow_tImImage
image
)
{
#if defined IMLIB
return
((
ImlibImage
*
)
image
)
->
rgb_width
;
#else
return
0
;
#endif
}
int
GlowDrawXLib
::
image_get_height
(
glow_tImImage
image
)
{
#if defined IMLIB
return
((
ImlibImage
*
)
image
)
->
rgb_height
;
#else
return
0
;
#endif
}
int
GlowDrawXLib
::
image_get_rowstride
(
glow_tImImage
image
)
{
#if defined IMLIB
return
((
ImlibImage
*
)
image
)
->
rgb_width
;
#else
return
0
;
#endif
}
unsigned
char
*
GlowDrawXLib
::
image_get_data
(
glow_tImImage
image
)
{
#if defined IMLIB
return
((
ImlibImage
*
)
image
)
->
rgb_data
;
#else
return
0
;
#endif
}
void
GlowDrawXLib
::
image_rotate
(
glow_tImImage
*
image
,
int
to_rotation
,
int
from_rotation
)
{
#if defined IMLIB
int
drot
=
to_rotation
-
from_rotation
;
drot
=
int
(
(
float
(
drot
)
/
360
-
floor
(
float
(
drot
)
/
360
))
*
360
);
printf
(
"Drot: %d
\n
"
,
drot
);
...
...
@@ -2845,16 +2862,21 @@ void GlowDrawXLib::image_rotate( glow_tImImage *image, int to_rotation, int from
if
(
drot
==
90
||
drot
==
180
)
Imlib_flip_image_horizontal
(
(
ImlibData
*
)
imlib
,
(
ImlibImage
*
)
*
image
);
}
#endif
}
void
GlowDrawXLib
::
image_flip_vertical
(
glow_tImImage
*
image
)
{
#if defined IMLIB
Imlib_flip_image_horizontal
(
(
ImlibData
*
)
imlib
,
(
ImlibImage
*
)
*
image
);
#endif
}
void
GlowDrawXLib
::
image_flip_horizontal
(
glow_tImImage
*
image
)
{
#if defined IMLIB
Imlib_flip_image_vertical
(
(
ImlibData
*
)
imlib
,
(
ImlibImage
*
)
*
image
);
#endif
}
void
GlowDrawXLib
::
image_scale
(
int
width
,
int
height
,
glow_tImImage
orig_im
,
glow_tImImage
*
im
,
...
...
@@ -2918,17 +2940,22 @@ int GlowDrawXLib::image_render( int width, int height,
void
GlowDrawXLib
::
image_free
(
glow_tImImage
image
)
{
#if defined IMLIB
Imlib_destroy_image
(
(
ImlibData
*
)
imlib
,
(
ImlibImage
*
)
image
);
#endif
}
void
GlowDrawXLib
::
pixmap_free
(
glow_tPixmap
pixmap
)
{
#if defined IMLIB
Imlib_free_pixmap
(
(
ImlibData
*
)
imlib
,
(
Pixmap
)
pixmap
);
#endif
}
void
GlowDrawXLib
::
image_pixel_iter
(
glow_tImImage
orig_image
,
glow_tImImage
*
image
,
void
(
*
pixel_cb
)(
void
*
,
unsigned
char
*
),
void
*
userdata
)
{
#if defined IMLIB
unsigned
char
*
rgb
;
int
rgb_height
;
int
rgb_width
;
...
...
@@ -2957,4 +2984,5 @@ void GlowDrawXLib::image_pixel_iter( glow_tImImage orig_image, glow_tImImage *im
}
Imlib_changed_image
(
(
ImlibData
*
)
imlib
,
(
ImlibImage
*
)
*
image
);
#endif
}
xtt/lib/glow/motif/glow_draw_xlib.h
View file @
f2690b34
...
...
@@ -32,7 +32,7 @@
#include <X11/Xutil.h>
#if defined OS_LINUX
#define IMLIB 1
//
#define IMLIB 1
#endif
#if defined IMLIB
...
...
xtt/lib/glow/src/glow_draw.h
View file @
f2690b34
...
...
@@ -22,10 +22,6 @@
#include <stdlib.h>
#if defined OS_LINUX
#define IMLIB 1
#endif
#define DRAW_CLIP_SIZE 10
class
GlowCtx
;
...
...
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