本文整理汇总了C#中LilyPath.Pen.ComputeMiter方法的典型用法代码示例。如果您正苦于以下问题:C# Pen.ComputeMiter方法的具体用法?C# Pen.ComputeMiter怎么用?C# Pen.ComputeMiter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LilyPath.Pen
的用法示例。
在下文中一共展示了Pen.ComputeMiter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddMiteredJoint
/// <summary>
/// Immediatley renders a <see cref="DrawCache"/> object.
/// </summary>
/// <param name="cache">A <see cref="DrawCache"/> object.</param>
/// <remarks>Any previous unflushed geometry will be rendered first.</remarks>
//public void DrawCache (DrawCache cache)
//{
// if (_sortMode != DrawSortMode.Immediate)
// SetRenderState();
// FlushBuffer();
// cache.Render(_device, _defaultTexture);
//}
//private void SetRenderState ()
//{
// _device.BlendState = (_blendState != null)
// ? _blendState : BlendState.AlphaBlend;
// _device.DepthStencilState = (_depthStencilState != null)
// ? _depthStencilState : DepthStencilState.None;
// _device.RasterizerState = (_rasterizerState != null)
// ? _rasterizerState : RasterizerState.CullCounterClockwise;
// _device.SamplerStates[0] = (_samplerState != null)
// ? _samplerState : SamplerState.PointWrap;
// _standardEffect.Projection = Matrix.CreateOrthographicOffCenter(0, _device.Viewport.Width, _device.Viewport.Height, 0, -1, 1);
// _standardEffect.World = _transform;
// _standardEffect.CurrentTechnique.Passes[0].Apply();
// if (_effect != null)
// _effect.CurrentTechnique.Passes[0].Apply();
//}
private void AddMiteredJoint (ref JoinSample js, Pen pen, PenWorkspace ws)
{
InsetOutsetCount vioCount = pen.ComputeMiter(ref js, ws);
AddVertex(ws.XYInsetBuffer[0], pen.ColorAt(ws.UVInsetBuffer[0], ws.PathLengthScale), pen);
AddVertex(ws.XYOutsetBuffer[0], pen.ColorAt(ws.UVOutsetBuffer[0], ws.PathLengthScale), pen);
}