91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0.28M
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2024-04-29
  • 語言: C#
  • 標簽: 方位角??飛行器??模擬??

資源簡介

飛行器在空中的姿態,不同于它在地理坐標系中的坐標值。本代碼形象的演示了什么是姿態角,其中的代碼和圖片資源也有一定的復用價值。對于想要根據3D模型上各個頂點坐標來計算姿態角的朋友,也有一定參考價值。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Globalization;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows;
using?System.Windows.Media;

namespace?HUD
{
????public?class?BorderTextLabel?:?System.Windows.Controls.Label
????{
????????private?static?void?Redraw(Dependencyobject?d?DependencyPropertyChangedEventArgs?e)
????????{
????????????((BorderTextLabel)d).InvalidateVisual();
????????}
????????public?string?Text
????????{
????????????get?{?return?(string)GetValue(TextProperty);?}
????????????set?{?SetValue(TextProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?TextProperty?=?DependencyProperty.Register(“Text“?typeof(string)?typeof(BorderTextLabel)?new?frameworkPropertymetadata(string.EmptyRedraw));

????????public?Brush?Stroke
????????{
????????????get?{?return?(Brush)GetValue(StrokeProperty);?}
????????????set?{?SetValue(StrokeProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?StrokeProperty?=?DependencyProperty.Register(“Stroke“?typeof(Brush)?typeof(BorderTextLabel)?new?frameworkPropertymetadata(Brushes.Black?Redraw));

????????public?double?StrokeThickness
????????{
????????????get?{?return?(double)GetValue(StrokeThicknessProperty);?}
????????????set?{?SetValue(StrokeThicknessProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?StrokeThicknessProperty?=?DependencyProperty.Register(“StrokeThickness“?typeof(double)?typeof(BorderTextLabel)?new?frameworkPropertymetadata((double)1?Redraw));

????????protected?override?void?OnRender(DrawingContext?drawingContext)
????????{
????????????base.OnRender(drawingContext);
????????????FormattedText?formattedText?=?new?FormattedText(this.Text?CultureInfo.CurrentCulture?FlowDirection?new?Typeface(FontFamily?Fontstyle?FontWeight?FontStretch)?FontSize?this.Foreground);
????????????if?(double.IsNaN(this.Width))
????????????????this.Width?=?formattedText.Width;
????????????if?(double.IsNaN(this.Height))
????????????????this.Height?=?formattedText.Height;
????????????Point?startp?=?new?Point(0?0);
????????????if?(this.HorizontalContentAlignment?==?HorizontalAlignment.Right)?startp.X?=?this.Width?-?formattedText.Width;
????????????if?(this.HorizontalContentAlignment?==?HorizontalAlignment.Center)?startp.X?=?(this.Width?-?formattedText.Width)?/?2;
????????????if?(this.VerticalContentAlignment?==?VerticalAlignment.Bottom)?startp.X?=?this.Height?-?formattedText.Height;
????????????if?(this.VerticalContentAlignment?==?VerticalAlignment.Center)?startp.X?=?(this.Height?-?formattedText.Height)?/?2;
????????????var?textgeometry?=?formattedText.BuildGeometry(startp);
????????????drawingContext.DrawGeometry(this.Foreground?new?Pen(Stroke?StrokeThickness)?textgeometry);
????????}

????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-08-01?07:31??HUD-master\
?????目錄???????????0??2017-08-01?07:31??HUD-master\HUD\
?????文件????????2885??2017-08-01?07:31??HUD-master\HUD\BorderTextLabel.cs
?????文件????????4050??2017-08-01?07:31??HUD-master\HUD\HUD.csproj
?????文件????????1458??2017-08-01?07:31??HUD-master\HUD\HUD.sln
?????文件????????4458??2017-08-01?07:31??HUD-master\HUD\HUDControl.xaml
?????文件???????31006??2017-08-01?07:31??HUD-master\HUD\HUDControl.xaml.cs
?????目錄???????????0??2017-08-01?07:31??HUD-master\HUD\Properties\
?????文件????????2226??2017-08-01?07:31??HUD-master\HUD\Properties\AssemblyInfo.cs
?????文件????????2778??2017-08-01?07:31??HUD-master\HUD\Properties\Resources.Designer.cs
?????文件????????5612??2017-08-01?07:31??HUD-master\HUD\Properties\Resources.resx
?????文件????????1114??2017-08-01?07:31??HUD-master\HUD\Properties\Settings.Designer.cs
?????文件?????????201??2017-08-01?07:31??HUD-master\HUD\Properties\Settings.settings
?????目錄???????????0??2017-08-01?07:31??HUD-master\HUDSample\
?????文件?????????187??2017-08-01?07:31??HUD-master\HUDSample\App.config
?????文件?????????372??2017-08-01?07:31??HUD-master\HUDSample\App.xaml
?????文件?????????336??2017-08-01?07:31??HUD-master\HUDSample\App.xaml.cs
?????文件????????4658??2017-08-01?07:31??HUD-master\HUDSample\HUDSample.csproj
?????文件????????2286??2017-08-01?07:31??HUD-master\HUDSample\MainWindow.xaml
?????文件?????????575??2017-08-01?07:31??HUD-master\HUDSample\MainWindow.xaml.cs
?????目錄???????????0??2017-08-01?07:31??HUD-master\HUDSample\Properties\
?????文件????????2271??2017-08-01?07:31??HUD-master\HUDSample\Properties\AssemblyInfo.cs
?????文件????????2831??2017-08-01?07:31??HUD-master\HUDSample\Properties\Resources.Designer.cs
?????文件????????5612??2017-08-01?07:31??HUD-master\HUDSample\Properties\Resources.resx
?????文件????????1096??2017-08-01?07:31??HUD-master\HUDSample\Properties\Settings.Designer.cs
?????文件?????????201??2017-08-01?07:31??HUD-master\HUDSample\Properties\Settings.settings
?????文件????????1082??2017-08-01?07:31??HUD-master\LICENSE
?????文件?????????169??2017-08-01?07:31??HUD-master\README.md
?????文件??????270962??2017-08-01?07:31??HUD-master\hud.png

評論

共有 條評論