mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
Allow user to add an outline and a drop shadow to the step label.
This commit is contained in:
parent
7e005f741a
commit
6f23bb32f1
1 changed files with 7 additions and 2 deletions
|
@ -147,6 +147,8 @@ namespace Greenshot.Editor.Drawing
|
||||||
{
|
{
|
||||||
AddField(GetType(), FieldType.FILL_COLOR, Color.DarkRed);
|
AddField(GetType(), FieldType.FILL_COLOR, Color.DarkRed);
|
||||||
AddField(GetType(), FieldType.LINE_COLOR, Color.White);
|
AddField(GetType(), FieldType.LINE_COLOR, Color.White);
|
||||||
|
AddField(GetType(), FieldType.LINE_THICKNESS, 0);
|
||||||
|
AddField(GetType(), FieldType.SHADOW, false);
|
||||||
AddField(GetType(), FieldType.FLAGS, FieldFlag.COUNTER);
|
AddField(GetType(), FieldType.FLAGS, FieldFlag.COUNTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,13 +198,16 @@ namespace Greenshot.Editor.Drawing
|
||||||
var rect = new NativeRect(Left, Top, Width, Height).Normalize();
|
var rect = new NativeRect(Left, Top, Width, Height).Normalize();
|
||||||
Color fillColor = GetFieldValueAsColor(FieldType.FILL_COLOR);
|
Color fillColor = GetFieldValueAsColor(FieldType.FILL_COLOR);
|
||||||
Color lineColor = GetFieldValueAsColor(FieldType.LINE_COLOR);
|
Color lineColor = GetFieldValueAsColor(FieldType.LINE_COLOR);
|
||||||
|
int lineThickness = GetFieldValueAsInt(FieldType.LINE_THICKNESS);
|
||||||
|
bool shadow = GetFieldValueAsBool(FieldType.SHADOW);
|
||||||
|
|
||||||
if (_drawAsRectangle)
|
if (_drawAsRectangle)
|
||||||
{
|
{
|
||||||
RectangleContainer.DrawRectangle(rect, graphics, rm, 0, Color.Transparent, fillColor, false);
|
RectangleContainer.DrawRectangle(rect, graphics, rm, lineThickness, lineColor, fillColor, shadow);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EllipseContainer.DrawEllipse(rect, graphics, rm, 0, Color.Transparent, fillColor, false);
|
EllipseContainer.DrawEllipse(rect, graphics, rm, lineThickness, lineColor, fillColor, shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
float fontSize = Math.Min(Math.Abs(Width), Math.Abs(Height)) / 1.4f;
|
float fontSize = Math.Min(Math.Abs(Width), Math.Abs(Height)) / 1.4f;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue