Skip to content

Commit

Permalink
Draw text without a glowing background, for use on a composition elem…
Browse files Browse the repository at this point in the history
…ent.
  • Loading branch information
Cocotteseb committed Nov 1, 2015
1 parent 0286bd1 commit d387670
Show file tree
Hide file tree
Showing 31 changed files with 420 additions and 117 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -231,20 +231,20 @@ public override void Layout(ViewLayoutContext context)
_mementoContentShadow1 = context.Renderer.RenderStandardContent.LayoutContent(context, shadowTextRect1,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false,false);

_mementoContentShadow2 = context.Renderer.RenderStandardContent.LayoutContent(context, shadowTextRect2,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false, false);
_contentProvider.OverrideTextColor = Color.Empty;
}

// Use the renderer to layout the text
_mementoContentText = context.Renderer.RenderStandardContent.LayoutContent(context, _textRect,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false, false);

_contentProvider.OverrideTextHint = PaletteTextHint.Inherit;
}
Expand Down Expand Up @@ -276,12 +276,12 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, shadowTextRect1,
_contentProvider, _mementoContentShadow1,
VisualOrientation.Top,
state, false, true);
state, false,false, true);

context.Renderer.RenderStandardContent.DrawContent(context, shadowTextRect1,
_contentProvider, _mementoContentShadow2,
VisualOrientation.Top,
state, false, true);
state, false, false, true);

_contentProvider.OverrideTextColor = Color.Empty;

Expand All @@ -290,7 +290,7 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, _textRect,
_contentProvider, _mementoContentText,
VisualOrientation.Top,
state, false, true);
state, false,false, true);

_contentProvider.OverrideTextHint = PaletteTextHint.Inherit;
}
Expand All @@ -310,7 +310,7 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, _textRect,
_contentProvider, _mementoContentText,
VisualOrientation.Top,
state, DrawOnComposition, true);
state, DrawOnComposition, DrawOnComposition, true);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public override Size GetPreferredSize(ViewLayoutContext context)
// Grab the required size for the content images
return context.Renderer.RenderStandardContent.GetContentPreferredSize(context, _paletteContent,
this, VisualOrientation.Top,
State, false);
State, false, false);
}

/// <summary>
Expand All @@ -143,7 +143,7 @@ public override void Layout(ViewLayoutContext context)
_mementoContent = context.Renderer.RenderStandardContent.LayoutContent(context, ClientRectangle,
_paletteContent, this,
VisualOrientation.Top,
State, false);
State, false, false);
}
#endregion

Expand Down Expand Up @@ -179,7 +179,7 @@ public override void RenderBefore(RenderContext context)
{
context.Renderer.RenderStandardContent.DrawContent(context, ClientRectangle, _paletteContent,
_mementoContent, VisualOrientation.Top,
State, false, false);
State, false, false, false);
}

// Are we allowed to draw border?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public override Size GetPreferredSize(ViewLayoutContext context)
// Ask the renderer for the contents preferred size
_preferredSize = context.Renderer.RenderStandardContent.GetContentPreferredSize(context, _contentProvider,
this, VisualOrientation.Top,
State, false);
State, false, false);

// Subtract the extra space used to ensure it draws
_heightExtra = (_ribbon.CalculatedValues.DrawFontHeight - _ribbon.CalculatedValues.RawFontHeight) * 2;
Expand Down Expand Up @@ -190,7 +190,7 @@ public override void Layout(ViewLayoutContext context)
_memento = context.Renderer.RenderStandardContent.LayoutContent(context, drawRect,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false, false);

// Cache values that are needed to decide if relayout is needed
_displayRect = ClientRectangle;
Expand All @@ -217,7 +217,7 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, drawRect,
_contentProvider, _memento,
VisualOrientation.Top,
State, false, true);
State, false, false, true);
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public override Size GetPreferredSize(ViewLayoutContext context)
// Ask the renderer for the contents preferred size
_preferredSize = context.Renderer.RenderStandardContent.GetContentPreferredSize(context, _contentProvider,
this, VisualOrientation.Top,
State, false);
State, false, false);

// Subtract the extra space used to ensure it draws
_heightExtra = (_ribbon.CalculatedValues.DrawFontHeight - _ribbon.CalculatedValues.RawFontHeight) * 2;
Expand Down Expand Up @@ -184,7 +184,7 @@ public override void Layout(ViewLayoutContext context)
_memento = context.Renderer.RenderStandardContent.LayoutContent(context, drawRect,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false, false);

// Cache values that are needed to decide if layout is needed
_displayRect = ClientRectangle;
Expand Down Expand Up @@ -212,7 +212,7 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, drawRect,
_contentProvider, _memento,
VisualOrientation.Top,
State, false, true);
State, false, false, true);
}
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public override Size GetPreferredSize(ViewLayoutContext context)
// Ask the renderer for the contents preferred size
_preferredSize = context.Renderer.RenderStandardContent.GetContentPreferredSize(context, _contentProvider,
this, VisualOrientation.Top,
State, false);
State, false, false);

// Subtract the extra space used to ensure it draws
_heightExtra = (_ribbon.CalculatedValues.DrawFontHeight - _ribbon.CalculatedValues.RawFontHeight) * 2;
Expand Down Expand Up @@ -181,7 +181,7 @@ public override void Layout(ViewLayoutContext context)
_memento = context.Renderer.RenderStandardContent.LayoutContent(context, drawRect,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false, false);

// Cache values that are needed to decide if layout is needed
_displayRect = ClientRectangle;
Expand All @@ -208,7 +208,7 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, drawRect,
_contentProvider, _memento,
VisualOrientation.Top,
State, false, true);
State, false, false, true);
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public override Size GetPreferredSize(ViewLayoutContext context)
// Ask the renderer for the contents preferred size
_preferredSize = context.Renderer.RenderStandardContent.GetContentPreferredSize(context, _contentProvider,
this, VisualOrientation.Top,
State, false);
State, false, false);

// Subtract the extra space used to ensure it draws
_heightExtra = (_ribbon.CalculatedValues.DrawFontHeight - _ribbon.CalculatedValues.RawFontHeight) * 2;
Expand Down Expand Up @@ -181,7 +181,7 @@ public override void Layout(ViewLayoutContext context)
_memento = context.Renderer.RenderStandardContent.LayoutContent(context, drawRect,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false, false);

// Cache values that are needed to decide if layout is needed
_displayRect = ClientRectangle;
Expand All @@ -208,7 +208,7 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, drawRect,
_contentProvider, _memento,
VisualOrientation.Top,
State, false, true);
State, false, false, true);
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public override Size GetPreferredSize(ViewLayoutContext context)
// Ask the renderer for the contents preferred size
_preferredSize = context.Renderer.RenderStandardContent.GetContentPreferredSize(context, _contentProvider,
this, VisualOrientation.Top,
State, false);
State, false, false);

// Subtract the extra space used to ensure it draws
_heightExtra = (_ribbon.CalculatedValues.DrawFontHeight - _ribbon.CalculatedValues.RawFontHeight) * 2;
Expand Down Expand Up @@ -184,7 +184,7 @@ public override void Layout(ViewLayoutContext context)
_memento = context.Renderer.RenderStandardContent.LayoutContent(context, drawRect,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false, false);

// Cache values that are needed to decide if layout is needed
_displayRect = ClientRectangle;
Expand All @@ -211,7 +211,7 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, drawRect,
_contentProvider, _memento,
VisualOrientation.Top,
State, false, true);
State, false, false, true);
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public override Size GetPreferredSize(ViewLayoutContext context)
// Ask the renderer for the contents preferred size
_preferredSize = context.Renderer.RenderStandardContent.GetContentPreferredSize(context, _contentProvider,
this, VisualOrientation.Top,
State, false);
State, false, false);

// Subtract the extra space used to ensure it draws
_heightExtra = (_ribbon.CalculatedValues.DrawFontHeight - _ribbon.CalculatedValues.RawFontHeight) * 2;
Expand Down Expand Up @@ -184,7 +184,7 @@ public override void Layout(ViewLayoutContext context)
_memento = context.Renderer.RenderStandardContent.LayoutContent(context, drawRect,
_contentProvider, this,
VisualOrientation.Top,
PaletteState.Normal, false);
PaletteState.Normal, false, false);

// Cache values that are needed to decide if layout is needed
_displayRect = ClientRectangle;
Expand All @@ -211,7 +211,7 @@ public override void RenderBefore(RenderContext context)
context.Renderer.RenderStandardContent.DrawContent(context, drawRect,
_contentProvider, _memento,
VisualOrientation.Top,
State, false, true);
State, false, false, true);
}
#endregion

Expand Down
Loading

0 comments on commit d387670

Please sign in to comment.