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
bad1933c
Commit
bad1933c
authored
May 20, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for video image files added
parent
dd709fa6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
1 deletion
+68
-1
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+4
-0
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+1
-0
xtt/lib/glow/src/glow_growimage.cpp
xtt/lib/glow/src/glow_growimage.cpp
+60
-1
xtt/lib/glow/src/glow_growimage.h
xtt/lib/glow/src/glow_growimage.h
+3
-0
No files found.
xtt/lib/glow/src/glow_growapi.cpp
View file @
bad1933c
...
...
@@ -3491,6 +3491,10 @@ void grow_GetNodeClassOrigo( grow_tObject object, double *x, double *y)
((
GrowNode
*
)
object
)
->
get_nodeclass_origo
((
GlowTransform
*
)
NULL
,
x
,
y
);
}
int
grow_ImageUpdate
(
grow_tObject
object
)
{
return
((
GrowImage
*
)
object
)
->
update
();
}
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
bad1933c
...
...
@@ -539,6 +539,7 @@ int grow_GetBackgroundObjectLimits( grow_tCtx ctx, glow_eTraceType type,
int
grow_GetTranslate
(
grow_tCtx
ctx
);
glow_eMB3Action
grow_GetMB3Action
(
grow_tCtx
ctx
);
void
grow_GetNodeClassOrigo
(
grow_tObject
object
,
double
*
x
,
double
*
y
);
int
grow_ImageUpdate
(
grow_tObject
object
);
#if defined __cplusplus
}
...
...
xtt/lib/glow/src/glow_growimage.cpp
View file @
bad1933c
...
...
@@ -5,6 +5,10 @@
#include <float.h>
#include <math.h>
#include <stdlib.h>
#if defined OS_LINUX || defined OS_LYNX
#include <sys/types.h>
#include <sys/stat.h>
#endif
#include "glow_transform.h"
#include "glow_growimage.h"
#include "glow_grownode.h"
...
...
@@ -41,6 +45,7 @@ GrowImage::GrowImage( GlowCtx *glow_ctx, char *name, double x, double y,
{
strcpy
(
n_name
,
name
);
strcpy
(
image_filename
,
""
);
strcpy
(
filename
,
""
);
strcpy
(
last_group
,
""
);
imlib
=
((
draw_tCtx
)
ctx
->
draw_ctx
)
->
imlib
;
if
(
imagefile
)
...
...
@@ -112,8 +117,9 @@ int GrowImage::insert_image( char *imagefile)
{
int
found
=
0
;
char
imagename
[
80
];
char
filename
[
120
];
char
*
s
;
struct
stat
info
;
int
sts
;
strcpy
(
image_filename
,
imagefile
);
...
...
@@ -150,6 +156,12 @@ int GrowImage::insert_image( char *imagefile)
}
#if defined IMLIB
sts
=
stat
(
filename
,
&
info
);
if
(
sts
==
-
1
)
return
0
;
date
=
info
.
st_ctime
;
if
(
pixmap
)
{
Imlib_free_pixmap
(
imlib
,
pixmap
);
pixmap
=
0
;
...
...
@@ -206,6 +218,53 @@ int GrowImage::insert_image( char *imagefile)
return
1
;
}
int
GrowImage
::
update
()
{
#if defined IMLIB
struct
stat
info
;
int
sts
;
sts
=
stat
(
filename
,
&
info
);
if
(
sts
==
-
1
)
return
0
;
if
(
date
==
info
.
st_ctime
)
return
0
;
date
=
info
.
st_ctime
;
if
(
original_image
)
Imlib_kill_image
(
imlib
,
original_image
);
original_image
=
Imlib_load_image
(
imlib
,
filename
);
if
(
!
original_image
)
return
0
;
if
(
pixmap
)
{
Imlib_free_pixmap
(
imlib
,
pixmap
);
pixmap
=
0
;
}
if
(
nav_pixmap
)
{
Imlib_free_pixmap
(
imlib
,
nav_pixmap
);
nav_pixmap
=
0
;
}
// Make a copy
if
(
image
)
Imlib_kill_image
(
imlib
,
image
);
image
=
Imlib_clone_image
(
imlib
,
original_image
);
set_image_color
(
image
,
NULL
);
Imlib_render
(
imlib
,
image
,
current_width
,
current_height
);
pixmap
=
Imlib_move_image
(
imlib
,
image
);
draw
();
return
1
;
#endif
return
0
;
}
void
GrowImage
::
zoom
()
{
ll
.
zoom
();
...
...
xtt/lib/glow/src/glow_growimage.h
View file @
bad1933c
...
...
@@ -51,6 +51,7 @@ class GrowImage : public GlowArrayElem {
void
get_object_name
(
char
*
name
)
{
strcpy
(
name
,
n_name
);};
void
set_object_name
(
char
*
name
)
{
strcpy
(
n_name
,
name
);};
void
align
(
double
x
,
double
y
,
glow_eAlignDirection
direction
);
int
update
();
GlowPoint
ll
;
GlowPoint
ur
;
...
...
@@ -100,6 +101,8 @@ class GrowImage : public GlowArrayElem {
int
current_nav_color_inverse
;
int
current_nav_direction
;
char
last_group
[
32
];
int
date
;
char
filename
[
256
];
int
insert_image
(
char
*
imagefile
);
void
zoom
();
...
...
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