diff options
| author | nyamatongwe <unknown> | 2011-11-05 19:57:03 +1100 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-11-05 19:57:03 +1100 | 
| commit | 45333513d37d6c4e8c56f4f62da4df57a3b611f7 (patch) | |
| tree | b54dd88a4fe64c1b739c68ec7868afe5fda345e6 | |
| parent | 428fa50f7c195b33ff5f42b1bdd608f6c437b7f5 (diff) | |
| download | scintilla-mirror-45333513d37d6c4e8c56f4f62da4df57a3b611f7.tar.gz | |
Fix failure to draw Polygons. Bug #3433558.
Was interpreting floating point values as integers.
| -rw-r--r-- | win32/PlatWin.cxx | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 01c36199b..c6d8df771 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -683,7 +683,12 @@ void SurfaceGDI::LineTo(int x_, int y_) {  void SurfaceGDI::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) {  	PenColour(fore);  	BrushColor(back); -	::Polygon(hdc, reinterpret_cast<POINT *>(pts), npts); +	std::vector<POINT> outline; +	for (int i=0;i<npts;i++) { +		POINT pt = {pts[i].x, pts[i].y}; +		outline.push_back(pt); +	} +	::Polygon(hdc, &outline[0], npts);  }  void SurfaceGDI::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) { | 
