[Scummvm-cvs-logs] SF.net SVN: scummvm:[53315] scummvm/trunk/engines/sword25/gfx/image/ vectorimagerenderer.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 01:34:47 CEST 2010
Revision: 53315
http://scummvm.svn.sourceforge.net/scummvm/?rev=53315&view=rev
Author: sev
Date: 2010-10-12 23:34:47 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Fix crashes with vector renderer. Still no gfx.
Modified Paths:
--------------
scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp
Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp 2010-10-12 23:34:25 UTC (rev 53314)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp 2010-10-12 23:34:47 UTC (rev 53315)
@@ -293,19 +293,26 @@
ArtSVP *svp1 = art_svp_from_vpath(vec);
- int penWidth = _elements[j].getLineStyleWidth(_elements[j].getPathInfo(i).getLineStyle());
- ArtSVP *svp2 = art_svp_vpath_stroke(vec, ART_PATH_STROKE_JOIN_ROUND, ART_PATH_STROKE_CAP_ROUND, penWidth, 1.0, 0.5);
+
+ if (_elements[j].getPathInfo(i).getFillStyle0()) {
+ int color1 = _elements[j].getFillStyleColor(_elements[j].getPathInfo(i).getFillStyle0() - 1);
+ art_rgb_svp_alpha1(svp1, 0, 0, width, height, color1, _pixelData, width * 4, NULL);
+ art_free(svp1);
+ }
+
+ if (_elements[j].getPathInfo(i).getLineStyle()) {
+ int penWidth = _elements[j].getLineStyleWidth(_elements[j].getPathInfo(i).getLineStyle() - 1);
+ ArtSVP *svp2 = art_svp_vpath_stroke(vec, ART_PATH_STROKE_JOIN_ROUND, ART_PATH_STROKE_CAP_ROUND, penWidth, 1.0, 0.5);
+ int color2 = _elements[j].getLineStyleColor(_elements[j].getPathInfo(i).getLineStyle() - 1);
+
+ art_rgb_svp_alpha1(svp2, 0, 0, width, height, color2, _pixelData, width * 4, NULL);
+
+ art_free(svp2);
+ }
+
if (needfree)
art_free(vec);
- int color1 = _elements[j].getFillStyleColor(_elements[j].getPathInfo(i).getFillStyle0());
- int color2 = _elements[j].getLineStyleColor(_elements[j].getPathInfo(i).getLineStyle());
-
- art_rgb_svp_alpha1(svp1, 0, 0, width, height, color1, _pixelData, width * 4, NULL);
- art_rgb_svp_alpha1(svp2, 0, 0, width, height, color2, _pixelData, width * 4, NULL);
-
- art_free(svp2);
- art_free(svp1);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list