[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, openvg, updated. 9e46c3f9bb02cc69fb22
From: |
Rob Savoye |
Subject: |
[Gnash-commit] [SCM] Gnash branch, openvg, updated. 9e46c3f9bb02cc69fb228c3b4132201ff8005194 |
Date: |
Sun, 23 Jan 2011 03:07:53 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, openvg has been updated
via 9e46c3f9bb02cc69fb228c3b4132201ff8005194 (commit)
via 44f9bea48bbfb2caa976db9b7c243ec7376e6cbc (commit)
via af6cc97b532f7ded00225234091b07251478b43e (commit)
from 516fc91dd2bbb638ac6a5e632772f0a0ad9288cc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=9e46c3f9bb02cc69fb228c3b4132201ff8005194
commit 9e46c3f9bb02cc69fb228c3b4132201ff8005194
Author: Rob Savoye <address@hidden>
Date: Sat Jan 22 20:07:40 2011 -0700
clear the entire display, not just the size of the swf being renderered.
diff --git a/librender/openvg/OpenVGRenderer.cpp
b/librender/openvg/OpenVGRenderer.cpp
index 4849d8a..673de1a 100644
--- a/librender/openvg/OpenVGRenderer.cpp
+++ b/librender/openvg/OpenVGRenderer.cpp
@@ -66,6 +66,8 @@
/// \brief The OpenVG renderer and related code.
///
+static const int TwipsPerInch = 1440;
+
namespace gnash {
static int tex_size;
@@ -203,6 +205,7 @@ Renderer_ovg::Renderer_ovg(renderer::GnashDevice::dtype_t
/* dtype */)
GNASH_REPORT_FUNCTION;
set_scale(1.0f, 1.0f);
+
_fillpaint = vgCreatePaint();
_strokepaint = vgCreatePaint();
@@ -355,29 +358,41 @@ Renderer_ovg::pixel_to_world(int x, int y)
///
/// @param width - stage width
/// @param height - stage height
-/// @param x0 - minimum frame size in X dimension
-/// @param x1 - maximum frame size in X dimension
-/// @param y0 - minimum frame size in Y dimension
-/// @param y1 - maximum frame size in Y dimension
+/// @param x0 - minimum frame size in X dimension in twips
+/// @param x1 - maximum frame size in X dimension in twips
+/// @param y0 - minimum frame size in Y dimension in twips
+/// @param y1 - maximum frame size in Y dimension in twips
void
Renderer_ovg::begin_display(gnash::rgba const&, int width, int height,
float x0, float x1, float y0, float y1)
{
// GNASH_REPORT_FUNCTION;
-
+
+ // std::cerr << "FIXME2: " << width / VGfloat(x1 - 1600) << " : "
+ // << -((VGfloat)height / VGfloat(y1 - 0)) << std::endl;
+
vgSeti (VG_MASKING, VG_FALSE);
+
+ // std::cerr << "FIXME1: " << width << ", " << height << ", " << x0 << ",
" << x1
+ // << ", " << y0 << ", " << y1 << std::endl;
VGfloat mat[9];
memset(mat, 0, sizeof(mat));
// sx and sy define scaling in the x and y directions, respectively;
// shx and shy define shearing in the x and y directions, respectively;
// tx and ty define translation in the x and y directions, respectively.
- mat[0] = (VGfloat)width / VGfloat(x1 - x0); // scale sx
+
+ // Flash internally calculates anything that uses pixels with
+ // twips (or 1/20 of a pixel). Sprites, movie clips and any other
+ // object on the stage are positioned with twips. As a result, the
+ // coordinates of (for example) sprites are always multiples of
+ // 0.05 (i.e. 1/20).
+ mat[0] = (VGfloat)width / VGfloat(x1 - x0); // scale sx = 0.05
mat[1] = 0; // shx
mat[3] = 0; // shy
- mat[4] = -((VGfloat)height / VGfloat(y1 - y0)); // scale sy
- mat[6] = 0; // shift tx
- mat[7] = height; // shift ty
+ mat[4] = -((VGfloat)height / VGfloat(y1 - y0)); // scale sy = -0.05
+ mat[6] = 0; // shift tx in pixels
+ mat[7] = height; // shift ty in pixels
vgSeti (VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
// The default values after vgLoadIdentity() are:
@@ -397,7 +412,7 @@ Renderer_ovg::begin_display(gnash::rgba const&, int width,
int height,
vgLoadMatrix (mat);
// vgSeti(VG_SCISSORING, VG_FALSE);
- vgClear(0, 0, width, height);
+ vgClear(0, 0, _display_width, _display_height);
}
void
@@ -684,9 +699,7 @@ Renderer_ovg::find_connecting_path(const Path& to_connect,
const Path* cur_path = *it;
if (cur_path == &to_connect) {
-
continue;
-
}
if (cur_path->ap.x == target_x && cur_path->ap.y == target_y) {
@@ -805,8 +818,8 @@ Renderer_ovg::apply_fill_style(const FillStyle& style,
const SWFMatrix& mat,
case SWF::FILL_FOCAL_GRADIENT:
{
log_debug("Fill Style Type: Radial Gradient");
- float x0, y0, x1, y1, radial;
- binfo->createRadialBitmap(x0, y0, x1, y1, radial, _fillpaint);
+ float radial = 0.5;
+ binfo->createRadialBitmap(mat.sx, mat.sy, mat.tx, mat.ty,
radial, _fillpaint);
break;
}
default:
@@ -1259,7 +1272,7 @@ void
Renderer_ovg::drawGlyph(const SWF::ShapeRecord& rec, const rgba& c,
const SWFMatrix& mat)
{
- GNASH_REPORT_FUNCTION;
+ // GNASH_REPORT_FUNCTION;
if (_drawing_mask) abort();
http://git.savannah.gnu.org/cgit//commit/?id=44f9bea48bbfb2caa976db9b7c243ec7376e6cbc
commit 44f9bea48bbfb2caa976db9b7c243ec7376e6cbc
Author: Rob Savoye <address@hidden>
Date: Sat Jan 22 20:06:26 2011 -0700
nil not NIL for emacs block
diff --git a/librender/agg/Renderer_agg.cpp b/librender/agg/Renderer_agg.cpp
index a0cbb88..3a74955 100644
--- a/librender/agg/Renderer_agg.cpp
+++ b/librender/agg/Renderer_agg.cpp
@@ -2180,6 +2180,6 @@ DSOEXPORT const char *agg_detect_pixel_format(unsigned
int rofs,
// Local Variables:
// mode: C++
-// indent-tabs-mode: NIL
+// indent-tabs-mode: nil
// End:
/* vim: set cindent tabstop=8 softtabstop=4 shiftwidth=4: */
http://git.savannah.gnu.org/cgit//commit/?id=af6cc97b532f7ded00225234091b07251478b43e
commit af6cc97b532f7ded00225234091b07251478b43e
Author: Rob Savoye <address@hidden>
Date: Sat Jan 22 20:05:58 2011 -0700
openvg.h, not open.h
diff --git a/macros/openvg.m4 b/macros/openvg.m4
index 49a6f31..ce500bf 100644
--- a/macros/openvg.m4
+++ b/macros/openvg.m4
@@ -55,7 +55,7 @@ AC_DEFUN([GNASH_PATH_OPENVG],
fi
if test x"${ac_cv_path_openvg_includes}" = x; then
- AC_CHECK_HEADERS([VG/open.h], [ac_cv_path_openvg_includes=""])
+ AC_CHECK_HEADERS([VG/openvg.h], [ac_cv_path_openvg_includes=""])
fi
if test x"${mesavg}" = xyes; then
-----------------------------------------------------------------------
Summary of changes:
librender/agg/Renderer_agg.cpp | 2 +-
librender/openvg/OpenVGRenderer.cpp | 43 ++++++++++++++++++++++------------
macros/openvg.m4 | 2 +-
3 files changed, 30 insertions(+), 17 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, openvg, updated. 9e46c3f9bb02cc69fb228c3b4132201ff8005194,
Rob Savoye <=