git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8adbe9a
)
fixed ImageShape image size lookup.
author
kramm
<kramm>
Sun, 16 May 2004 18:54:10 +0000
(18:54 +0000)
committer
kramm
<kramm>
Sun, 16 May 2004 18:54:10 +0000
(18:54 +0000)
lib/python/tags.c
patch
|
blob
|
history
diff --git
a/lib/python/tags.c
b/lib/python/tags.c
index
e642125
..
a9e8181
100644
(file)
--- a/
lib/python/tags.c
+++ b/
lib/python/tags.c
@@
-347,6
+347,18
@@
static void image_dealloc(tag_internals_t*self)
free(pi->rgba);pi->rgba = 0;
}
}
free(pi->rgba);pi->rgba = 0;
}
}
+static int imagetag_getWidth(PyObject* self)
+{
+ tag_internals_t*itag = tag_getinternals(self);
+ image_internal_t*pi = (image_internal_t*)itag->data;
+ return pi->width;
+}
+static int imagetag_getHeight(PyObject* self)
+{
+ tag_internals_t*itag = tag_getinternals(self);
+ image_internal_t*pi = (image_internal_t*)itag->data;
+ return pi->height;
+}
static PyObject* f_DefineImage(PyObject* self, PyObject* args, PyObject* kwargs)
{
static char *kwlist[] = {"image"};
static PyObject* f_DefineImage(PyObject* self, PyObject* args, PyObject* kwargs)
{
static char *kwlist[] = {"image"};
@@
-420,8
+432,8
@@
static PyObject* f_DefineImageShape(PyObject* self, PyObject* args, PyObject* kw
shape_internal_t*ti = (shape_internal_t*)itag->data;
ti->shape = 0; /*HACK*/
shape_internal_t*ti = (shape_internal_t*)itag->data;
ti->shape = 0; /*HACK*/
- int width = image_getWidth(image);
- int height = image_getHeight(image);
+ int width = imagetag_getWidth(image);
+ int height = imagetag_getHeight(image);
int id = tagmap_add(itag->tagmap, image);
itag->tag= swf_InsertTag(0, ST_DEFINESHAPE3);
swf_SetU16(itag->tag, 0);
int id = tagmap_add(itag->tagmap, image);
itag->tag= swf_InsertTag(0, ST_DEFINESHAPE3);
swf_SetU16(itag->tag, 0);