mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Fixed Bug #3056670, RenderMode.EDIT was always even used when exporting.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@875 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
f55107dd2f
commit
cd8092859c
4 changed files with 13 additions and 11 deletions
|
@ -307,7 +307,7 @@ namespace Greenshot.Drawing {
|
|||
public virtual void DrawContent(Graphics graphics, Bitmap bmp, RenderMode renderMode) {
|
||||
//if(LOG.IsDebugEnabled) LOG.Debug("Drawing container "+this+" with bounds "+Bounds+" and " + Children.Count + " children and status: "+Status);
|
||||
if(Children.Count>0) {
|
||||
if(!Status.Equals(EditStatus.IDLE)) {
|
||||
if(Status != EditStatus.IDLE) {
|
||||
DrawSelectionBorder(graphics, Bounds);
|
||||
} else {
|
||||
Rectangle effRect = Bounds;
|
||||
|
@ -321,7 +321,7 @@ namespace Greenshot.Drawing {
|
|||
|
||||
}
|
||||
}
|
||||
Draw(graphics, RenderMode.EDIT);
|
||||
Draw(graphics, renderMode);
|
||||
}
|
||||
|
||||
public virtual bool Contains(int x, int y) {
|
||||
|
|
|
@ -145,10 +145,10 @@ namespace Greenshot.Drawing {
|
|||
/// Triggers all elements in the list ot be redrawn.
|
||||
/// </summary>
|
||||
/// <param name="g">the related Graphics object</param>
|
||||
/// <param name="rm">the rendermode in which the element is to be drawn</param>
|
||||
public void Draw(Graphics g, Bitmap bitmap, RenderMode rm) {
|
||||
/// <param name="renderMode">the rendermode in which the element is to be drawn</param>
|
||||
public void Draw(Graphics g, Bitmap bitmap, RenderMode renderMode) {
|
||||
foreach(DrawableContainer dc in this) {
|
||||
dc.DrawContent(g, bitmap, rm);
|
||||
dc.DrawContent(g, bitmap, renderMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ namespace Greenshot.Drawing {
|
|||
g.DrawRectangle(pen, rect);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -254,7 +254,7 @@ namespace Greenshot.Drawing {
|
|||
UpdateFont();
|
||||
|
||||
Rectangle rect = GuiRectangle.GetGuiRectangle(this.Left, this.Top, this.Width, this.Height);
|
||||
if (Selected && !rm.Equals(RenderMode.EXPORT)) {
|
||||
if (Selected && rm == RenderMode.EDIT) {
|
||||
DrawSelectionBorder(g, rect);
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,9 @@ namespace Greenshot.Drawing {
|
|||
while (currentStep <= steps) {
|
||||
int offset = currentStep;
|
||||
Rectangle shadowRect = GuiRectangle.GetGuiRectangle(Left + offset, Top + offset, Width, Height);
|
||||
if(lineThickness>0) shadowRect.Inflate(-textOffset, -textOffset);
|
||||
if(lineThickness > 0) {
|
||||
shadowRect.Inflate(-textOffset, -textOffset);
|
||||
}
|
||||
using (Brush fontBrush = new SolidBrush(Color.FromArgb(alpha, 100, 100, 100))) {
|
||||
g.DrawString(text, font, fontBrush, shadowRect);
|
||||
currentStep++;
|
||||
|
@ -287,13 +289,12 @@ namespace Greenshot.Drawing {
|
|||
|
||||
Color lineColor = GetFieldValueAsColor(FieldType.LINE_COLOR);
|
||||
Rectangle fontRect = rect;
|
||||
if(lineThickness>0) fontRect.Inflate(-textOffset,-textOffset);
|
||||
if(lineThickness > 0) {
|
||||
fontRect.Inflate(-textOffset,-textOffset);
|
||||
}
|
||||
using (Brush fontBrush = new SolidBrush(lineColor)) {
|
||||
g.DrawString(text, font, fontBrush, fontRect);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue