本文整理匯總了C#中SharpDX.Direct2D1.RenderTarget.FillRoundedRectangle方法的典型用法代碼示例。如果您正苦於以下問題:C# RenderTarget.FillRoundedRectangle方法的具體用法?C# RenderTarget.FillRoundedRectangle怎麽用?C# RenderTarget.FillRoundedRectangle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SharpDX.Direct2D1.RenderTarget
的用法示例。
在下文中一共展示了RenderTarget.FillRoundedRectangle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: OnRender
public void OnRender(RenderTarget target)
{
if (mImage == null)
return;
target.DrawBitmap(mImage, mTargetRectangle, 1.0f, BitmapInterpolationMode.Linear, mSourceRectangle);
if (mIndexLocation == 0)
{
target.FillRoundedRectangle(new RoundedRectangle
{
RadiusX = 5,
RadiusY = 5,
Rect = new RectangleF(Position.X + 5, Position.Y + 2, mIndexDraw.GetLayout().Metrics.Width + 10, mIndexDraw.GetLayout().Metrics.Height + 4)
}, Brushes.Solid[0xDD555555]);
}
else
{
target.FillRoundedRectangle(new RoundedRectangle
{
RadiusX = 5,
RadiusY = 5,
Rect = new RectangleF(Position.X + mTargetRectangle.Width - mIndexDraw.GetLayout().Metrics.Width - 15, Position.Y + 2, mIndexDraw.GetLayout().Metrics.Width + 10, mIndexDraw.GetLayout().Metrics.Height + 4)
}, Brushes.Solid[0xDD555555]);
}
target.DrawTextLayout(new Vector2(mPosition.X + 10, mPosition.Y + 5), mIndexDraw, Brushes.White);
}