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

  • 大小: 17KB
    文件類型: .cs
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-05-10
  • 語言: C#
  • 標(biāo)簽: 云圖??等高線圖??算法??

資源簡介

介紹三種繪制云圖或等高線圖的算法。點(diǎn)距離反比插值、雙線性插值和面距離反比+雙線性插值。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.IO;
using?System.Windows;
using?System.Windows.Controls;
using?System.Windows.Media;
using?System.Windows.Media.Imaging;

namespace?WPFCtrlLib
{
????///?
????///?云圖控件
????///?

????public?partial?class?CloudGraphCtrl?:?UserControl
????{
????????private?int?DataX?DataY;
????????private?int?GraphWidth?GraphHeight;
????????private?WriteableBitmap?GraphBitmap;
????????private?double?MinValue?MaxValue;
????????private?double[]?MapData;
????????private?List?ColorByteList;
????????private?byte[]?Rs?Gs?Bs;

????????public?CloudGraphCtrl()
????????{
????????????InitializeComponent();
????????}

????????///?
????????///?數(shù)據(jù)源
????????///?

????????public?double[]?DataSource
????????{
????????????get?{?return?(double[])GetValue(DataSourceProperty);?}
????????????set?{?SetValue(DataSourceProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?DataSourceProperty?=
????????????DependencyProperty.Register(“DataSource“?typeof(double[])?typeof(CloudGraphCtrl)?new?Propertymetadata(null?(s?e)?=>
????????????{
????????????????(s?as?CloudGraphCtrl).Draw();
????????????}));

????????///?
????????///?顏色列表
????????///?

????????public?string?ColorList
????????{
????????????get?{?return?(string)GetValue(ColorListProperty);?}
????????????set?{?SetValue(ColorListProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?ColorListProperty?=
????????????DependencyProperty.Register(“ColorList“?typeof(string)?typeof(CloudGraphCtrl)?new?Propertymetadata(“#FA1207#FAAD07#ECFA07#07FAA7#07C4FA#072FFA“));

????????///?
????????///?顏色跨度
????????///?

????????public?int?ColorGap
????????{
????????????get?{?return?(int)GetValue(ColorGapProperty);?}
????????????set?{?SetValue(ColorGapProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?ColorGapProperty?=
????????????DependencyProperty.Register(“ColorGap“?typeof(int)?typeof(CloudGraphCtrl)?new?Propertymetadata(10));

????????///?
????????///?使用算法,取值1、2、3
????????///?

????????public?int?Method
????????{
????????????get?{?return?(int)GetValue(MethodProperty);?}
????????????set?{?SetValue(MethodProperty?value);?}
????????}
????????public?static?readonly?DependencyProperty?MethodProperty?=
????????????DependencyProperty.Register(“Method“?typeof(int)?typeof(CloudGraphCtrl)?new?Propertymetadata(1));

????????private?void?UserControl_SizeChanged(object?sender?RoutedEventArgs?e)
????????{
????????????Draw();
????????}

????????private?void?Draw()
????????{
????????????if?(DataSource?==?null)
????????????{
????????????????return;
????????????}

????????????DataX?=?DataSource.GetLength(0);
????????????DataY?=?DataSource.GetLength(1);

????????????GraphWidth?=?(int)this.ActualWidth?-?90;
????????????Grap

評(píng)論

共有 條評(píng)論