Commit b146bbf4 authored by 潘栩锋's avatar 潘栩锋 🚴

修复 环型图改回 外厚内薄

parent 783da53b
......@@ -76,7 +76,7 @@
</Style>
</iconPacks:PackIconMaterial.Style>
</iconPacks:PackIconMaterial>
<TextBlock FontSize="18" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Right" VerticalAlignment="Bottom" Foreground="#FF3B3B3B" >
<TextBlock FontSize="15" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Right" VerticalAlignment="Bottom" Foreground="#FF3B3B3B" >
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="逆时针"/>
......
......@@ -471,6 +471,8 @@ new PropertyChangedCallback(delegate (DependencyObject d, DependencyPropertyChan
else {
stroke = brush_alarm;
}
//-公差线
r = target_r + toleranceThickness * i;
Ellipse ellipse_alarm1 = new Ellipse()
......@@ -546,11 +548,20 @@ new PropertyChangedCallback(delegate (DependencyObject d, DependencyPropertyChan
percent = 0.01;
double toleranceThickness = GraphThickness / (2 * YRangePercent);
double target_r = InnerRingThickness + GraphThickness * 0.5;
////Value 外小 内大
////负公差
//Draw_Marker(new Polar() { Degrees = startAngle, Radius = target_r + toleranceThickness }, $"{(-100 * percent):F0}%");
////正公差
//Draw_Marker(new Polar() { Degrees = startAngle, Radius = target_r - toleranceThickness }, $"{(+100 * percent):F0}%");
//Value 外大 内小
//负公差
Draw_Marker(new Polar() { Degrees = startAngle, Radius = target_r + toleranceThickness }, $"{(-100 * percent):F0}%");
Draw_Marker(new Polar() { Degrees = startAngle, Radius = target_r - toleranceThickness }, $"{(-100 * percent):F0}%");
//正公差
Draw_Marker(new Polar() { Degrees = startAngle, Radius = target_r - toleranceThickness }, $"{(+100 * percent):F0}%");
Draw_Marker(new Polar() { Degrees = startAngle, Radius = target_r + toleranceThickness }, $"{(+100 * percent):F0}%");
}
void Draw_Marker(Polar polar, string s)
{
......@@ -664,16 +675,23 @@ new PropertyChangedCallback(delegate (DependencyObject d, DependencyPropertyChan
arc.Fill = AreaColors[0];
}
//扇型的厚度
arc.ArcThickness = Math.Abs(r);
if (r < 0)
{
arc.Width = (target_r - r) * 2;
}
//扇型最外圆直径
//Value 外小 内大
//if (r < 0)
// arc.Width = (target_r - r) * 2;
//else
// arc.Width = target_r * 2;
//Value 外大 内小
if (r > 0)
arc.Width = (target_r + r) * 2;
else
{
arc.Width = target_r * 2;
}
arc.Height = arc.Width;
arc.Margin = new Thickness(Radius - arc.Width / 2);
......
......@@ -61,7 +61,7 @@
</Grid.ColumnDefinitions>
<uimodule:PolarChart x:Name="graph" Grid.Row="1" Grid.ColumnSpan="3" />
<TextBlock Grid.Row="1" Grid.ColumnSpan="3" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="5" Foreground="{StaticResource Color_theme_noact}">
备注:外薄内厚
备注:外厚内薄
</TextBlock>
<Button Style="{StaticResource ButtonStyle_icon}" Margin="0,0,0,-20"
Click="Button_info_click" >
......
......@@ -65,7 +65,7 @@
</Style>
</iconPacks:PackIconMaterial.Style>
</iconPacks:PackIconMaterial>
<TextBlock FontSize="18" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Right" VerticalAlignment="Bottom" Foreground="#FF3B3B3B" >
<TextBlock FontSize="15" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Right" VerticalAlignment="Bottom" Foreground="#FF3B3B3B" >
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="逆时针"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment