From 5259c865c80454200e7072fb8a9a1bf97470898a Mon Sep 17 00:00:00 2001 From: Carl Thronson Date: Wed, 27 Apr 2016 14:48:57 -0700 Subject: [PATCH] Bugzilla 483851 - Recent versions of BIRT/Eclipse show a blank pie chart with Eclipse MAT. In the setProperty method of the SWT renderer implementation, check for sProperty equals IDeviceRenderer.EXPECTED_BOUNDS, and if so, set clipping on the graphics context. Signed-off-by: Carl Thronson --- .../eclipse/birt/chart/device/swt/SwtRendererImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtRendererImpl.java b/chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtRendererImpl.java index 13d3d822dfa..85d3285e704 100644 --- a/chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtRendererImpl.java +++ b/chart/org.eclipse.birt.chart.device.swt/src/org/eclipse/birt/chart/device/swt/SwtRendererImpl.java @@ -1969,6 +1969,15 @@ else if ( sProperty.equals( IDeviceRenderer.DPI_RESOLUTION ) ) { getDisplayServer( ).setDpiResolution( ( (Integer) oValue ).intValue( ) ); } + else if ( sProperty.equals( IDeviceRenderer.EXPECTED_BOUNDS ) ) + { + Bounds bo = (Bounds)oValue; + int x = (int)Math.round( bo.getLeft( ) ); + int y = (int)Math.round( bo.getTop( ) ); + int width = (int)Math.round( bo.getWidth( ) ); + int height = (int)Math.round( bo.getHeight( ) ); + this._gc.setClipping( x, y, width, height ); + } } /**