diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2014-12-22 08:08:36 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2014-12-22 08:08:36 +0100 |
| commit | e8b13fbea6cab4f01af769a1246c49c588fa2f3e (patch) | |
| tree | 649f51c9c995c5f0c106ce3c60bc99fd364b1368 /src/GraphicObjects/Image.cs | |
| parent | 1753010a7b08f29f425356171f78817dc8c6e7f4 (diff) | |
CompilerServices for EventHandler statements in XML attributes
Improve code formatting
debug
Diffstat (limited to 'src/GraphicObjects/Image.cs')
| -rwxr-xr-x[-rw-r--r--] | src/GraphicObjects/Image.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs index ce60a8eb..a71205b6 100644..100755 --- a/src/GraphicObjects/Image.cs +++ b/src/GraphicObjects/Image.cs @@ -56,12 +56,12 @@ namespace go Bitmap = _bitmap;
}
- public override Size measureRawSize ()
+ protected override Size measureRawSize ()
{
if (image == null)
loadImage (@"Images/Icons/icon_alert.gif");
- return imgSize + (BorderWidth + Margin)*2;
+ return imgSize + Margin*2;
}
//load image via System.Drawing.Bitmap, cairo load png only
@@ -94,15 +94,15 @@ namespace go bitmap.UnlockBits (data);
//bitmap.Dispose();
}
- public override void onDraw (Context gr)
+ protected override void onDraw (Context gr)
{
base.onDraw (gr);
float ratio = 1f;
- float widthRatio = (float)clientBounds.Width / imgSize.Width;
- float heightRatio = (float)clientBounds.Height / imgSize.Height;
+ float widthRatio = (float)ClientRectangle.Width / imgSize.Width;
+ float heightRatio = (float)ClientRectangle.Height / imgSize.Height;
ratio = Math.Min (widthRatio, heightRatio);
- Rectangle rImg = clientBounds;
+ Rectangle rImg = ClientRectangle;
gr.Scale (widthRatio, heightRatio);
using (ImageSurface imgSurf = new ImageSurface(image, Format.Argb32,
|