Permalink
Browse files

Renamed the Shape enum type to CursorShape

  • Loading branch information...
don-mccomb committed Nov 22, 2012
1 parent df19c75 commit aeff80f3dcb938e53d3f8745617572036ea4fb32
@@ -284,7 +284,7 @@ public void SetCursor (Gdk.Cursor cursor)
/// <param name="shapeX">The X position in the returned Pixbuf that will be the center of the shape.</param>
/// <param name="shapeY">The Y position in the returned Pixbuf that will be the center of the shape.</param>
/// <returns>The new cursor icon with an shape that represents the tool's thickness.</returns>
- protected Gdk.Pixbuf CreateIconWithShape(string imgName, Shape shape, int shapeWidth,
+ protected Gdk.Pixbuf CreateIconWithShape(string imgName, CursorShape shape, int shapeWidth,
int imgToShapeX, int imgToShapeY,
out int shapeX, out int shapeY)
{
@@ -341,12 +341,12 @@ public void SetCursor (Gdk.Cursor cursor)
switch (shape)
{
- case Shape.Ellipse:
+ case CursorShape.Ellipse:
g.DrawEllipse(shapeRect, outerColor, 1);
shapeRect = shapeRect.Inflate (-1, -1);
g.DrawEllipse(shapeRect, innerColor, 1);
break;
- case Shape.Rectangle:
+ case CursorShape.Rectangle:
g.DrawRectangle(shapeRect, outerColor, 1);
shapeRect = shapeRect.Inflate (-1, -1);
g.DrawRectangle(shapeRect, innerColor, 1);
@@ -1,5 +1,5 @@
//
-// Shape.cs
+// CursorShape.cs
//
// Author:
// Don McComb <don.mccomb@gmail.com>
@@ -27,7 +27,7 @@
namespace Pinta.Core
{
- public enum Shape
+ public enum CursorShape
{
Ellipse,
Rectangle
@@ -209,7 +209,7 @@
<Compile Include="Widgets\ToolBarDropDownButton.cs" />
<Compile Include="Clipper\Clipper.cs" />
<Compile Include="Actions\AddinActions.cs" />
- <Compile Include="Enumerations\Shape.cs" />
+ <Compile Include="Enumerations\CursorShape.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
@@ -50,7 +50,7 @@ public class CloneStampTool : BaseBrushTool
get {
int iconOffsetX, iconOffsetY;
var icon = CreateIconWithShape ("Cursor.CloneStamp.png",
- Shape.Ellipse, BrushWidth, 6, 11,
+ CursorShape.Ellipse, BrushWidth, 6, 11,
out iconOffsetX, out iconOffsetY);
return new Gdk.Cursor (PintaCore.Chrome.Canvas.Display, icon, iconOffsetX, iconOffsetY);
}
@@ -73,7 +73,7 @@ public ColorPickerTool ()
get {
int iconOffsetX, iconOffsetY;
var icon = CreateIconWithShape ("Cursor.ColorPicker.png",
- Shape.Rectangle, SampleSize, 1, 16,
+ CursorShape.Rectangle, SampleSize, 1, 16,
out iconOffsetX, out iconOffsetY);
return new Gdk.Cursor (PintaCore.Chrome.Canvas.Display, icon, iconOffsetX, iconOffsetY);
}
@@ -57,7 +57,7 @@ protected override void OnBuildToolBar(Toolbar tb)
get {
int iconOffsetX, iconOffsetY;
var icon = CreateIconWithShape ("Tools.Eraser.png",
- Shape.Ellipse, BrushWidth, 0, 14,
+ CursorShape.Ellipse, BrushWidth, 0, 14,
out iconOffsetX, out iconOffsetY);
return new Gdk.Cursor (PintaCore.Chrome.Canvas.Display, icon, iconOffsetX, iconOffsetY);
}
@@ -45,7 +45,7 @@ public class PaintBrushTool : BaseBrushTool
get {
int iconOffsetX, iconOffsetY;
var icon = CreateIconWithShape ("Tools.Paintbrush.png",
- Shape.Ellipse, BrushWidth, 0, 16,
+ CursorShape.Ellipse, BrushWidth, 0, 16,
out iconOffsetX, out iconOffsetY);
return new Gdk.Cursor (PintaCore.Chrome.Canvas.Display, icon, iconOffsetX, iconOffsetY);
}

0 comments on commit aeff80f

Please sign in to comment.