gpt4 book ai didi

c# - SciChart FastLineRenderableSeries 抗锯齿不起作用

转载 作者:行者123 更新时间:2023-11-30 16:49:34 30 4
gpt4 key购买 nike

我已尝试在折线图(实时 FIFO)上将 AntiAliasing 设置为 true,但它似乎不起作用。还有什么我需要做的吗?

这是 XAML...

<s:SciChartSurface x:Name="sciChart" Grid.Column="1" GridLinesPanelStyle="{StaticResource GridLinesPanelStyle}" RenderTransformOrigin="0.498,0.48" RenderableSeries="{Binding ChartSeries}">

以及背后的代码......

    private void AddCurveToChart(XyDataSeries<double, double> curveSeries)
{

FastLineRenderableSeries renderableCurve = new FastLineRenderableSeries
{
DataSeries = curveSeries,
Stroke = (Color)ColorConverter.ConvertFromString(Strokes[ChartSeries.Count < Strokes.Length ? ChartSeries.Count : Strokes.Length - 1]),
StrokeThickness = 2,
AntiAliasing = true,

};

ChartSeries.Add(renderableCurve);

RaisePropertiesChanged("ChartSeries");
}

但是,正如您从屏幕截图中看到的那样,我仍然遇到“锯齿”......

enter image description here

最佳答案

根据 SciChart您需要使用高质量、DirectX 或矢量渲染器插件之一才能获得抗锯齿线。他们将您引导至此 article有关插件的更多信息。

  • The HighSpeedRenderSurface An integer coordinate, fast, software renderer (CPU Based). Produces jagged lines but it's very quick.

  • The HighQualityRenderSurface (Available in the Pro and Source Editions) A floating point coordinate software renderer (CPU Based).
    Produces the best quality image, but uses more CPU resources than
    HighSpeed.

  • The Direct3D10RenderSurface (Available in the Source Edition) A floating point, DirectX10 hardware renderer (GPU Based). Utilizes
    pixel shaders to offload as much computation to the GPU as possible.

HighSpeedRenderSurface 默认使用,它会产生锯齿状的线条。

要启用 HighQualityRenderSurface(仅在专业版中可用):

<s:SciChartSurface>
<s:SciChartSurface.RenderSurface>
<s:HighQualityRenderSurface/>
</s:SciChartSurface.RenderSurface>
</s:SciChartSurface>

Direct3D10RenderSurface 可以这样使用(仅在“源代码版”中可用):

<s:SciChartSurface.RenderSurface>
<s3D:Direct3D10RenderSurface InitializationFailed="OnDirectXInitializationFailed"
RenderingFailed="OnDirectXRenderingFailed"/>
</s:SciChartSurface.RenderSurface>

关于c# - SciChart FastLineRenderableSeries 抗锯齿不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36501022/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com