• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Media.CompositeTransform类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Media.CompositeTransform的典型用法代码示例。如果您正苦于以下问题:C# CompositeTransform类的具体用法?C# CompositeTransform怎么用?C# CompositeTransform使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CompositeTransform类属于System.Windows.Media命名空间,在下文中一共展示了CompositeTransform类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ChangeModeExpanderOnCollapsed

 private void ChangeModeExpanderOnCollapsed(object sender, RoutedEventArgs e)
 {
     ChangeModeGrid.Height = 100;
     ChangeModeExpander.Height = 73;
     var transform = new CompositeTransform {Rotation = -90};
     IndicatorImage.RenderTransform = transform;
 }
开发者ID:huucp,项目名称:DiscoRobo,代码行数:7,代码来源:HelpPage.xaml.cs


示例2: azul_ManipulationCompleted_1

        // Al soltar el circulo. Comprueba coordenadas.
        private void azul_ManipulationCompleted_1(object sender, ManipulationCompletedEventArgs e)
        {
            Ellipse elipse = sender as Ellipse;
            string nombreObjeto = (sender as Ellipse).Name;
            double elipsex = Canvas.GetLeft(rect) + e.TotalManipulation.Translation.X;
            double elipsey = Canvas.GetTop(rect) + e.TotalManipulation.Translation.Y;
            //Canvas.Left="130" Canvas.Top="138"  Width="187"
            if (elipse.Name == "rojo" || elipse.Name == "azul" || elipse.Name == "amarillo")
            {
                if ((elipsex * -1) > 130 && (elipsex * -1) < 317)
                {
                    CambiarColores(nombreObjeto, nombreAnterior);
                }
            }
                //??
            else
            {
                if ((e.TotalManipulation.Translation.Y * -1) > 312 && (e.TotalManipulation.Translation.Y * -1) < 560)
                {
                    CambiarColores(nombreObjeto, nombreAnterior);
                }
            }

            if (ver == 0)
            {
                nombreAnterior = (sender as Ellipse).Name;
            }
            elipse.RenderTransform = null;
            dragTranslation = new CompositeTransform();
        }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:31,代码来源:MainPage.xaml.cs


示例3: ChangeModeExpanderOnExpanded

 private void ChangeModeExpanderOnExpanded(object sender, RoutedEventArgs routedEventArgs)
 {
     ChangeModeGrid.Height = 530;
     ChangeModeExpander.Height = 530;
     var transform = new CompositeTransform { Rotation = 0 };
     IndicatorImage.RenderTransform = transform;
 }
开发者ID:huucp,项目名称:DiscoRobo,代码行数:7,代码来源:HelpPage.xaml.cs


示例4: Imagenes1_Loaded

 void Imagenes1_Loaded(object sender, RoutedEventArgs e)
 {
     re = new Recursos();
     re.reporducirSonido("/Sonidos/Voces/PintarGatoPelota.mp3");
     
     dragTranslation = new CompositeTransform();        
 }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:7,代码来源:Imagenes1.xaml.cs


示例5: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/44-BoxingGlove;component/MainPage.xaml", System.UriKind.Relative));
     this.ImageTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("ImageTransform")));
 }
开发者ID:1e0heen9,项目名称:wp7demo101,代码行数:8,代码来源:MainPage.g.i.cs


示例6: Ficha

 public Ficha()
 {
     transform = new CompositeTransform();
     this.ManipulationStarted += InicioManipulacion;
     this.ManipulationDelta += Manipulacion;
     this.ManipulationCompleted += FinManipulacion;
     this.RenderTransform = transform;
 }
开发者ID:jagdeveloper,项目名称:WP8,代码行数:8,代码来源:Ficha.cs


示例7: TouchFrameReported

        void TouchFrameReported(object sender, TouchFrameEventArgs e)
        {
            while (TouchPanel.IsGestureAvailable)
            {
                GestureSample gestureSample = TouchPanel.ReadGesture();
                if(gestureSample.GestureType == GestureType.Pinch)
                {
                    if(!_isScaleStarted)
                    {
                        _compositeTransform = new CompositeTransform();
                        Transforms.Children.Add(_compositeTransform);
                        _compositeTransform.CenterX = (gestureSample.Position.X + gestureSample.Position2.X) / 2;
                        _compositeTransform.CenterY = (gestureSample.Position.Y + gestureSample.Position2.Y) / 2;

                        _gestWidth = Math.Abs(gestureSample.Position.X - gestureSample.Position2.X);
                        _gestHeight = Math.Abs(gestureSample.Position.Y - gestureSample.Position2.Y);

                        _isScaleStarted = true;
                    }
                    else
                    {
                        //if (Transforms.Children.OfType<CompositeTransform>().Select(x=>x.ScaleX).Multiplication() >= 1)
                        {
                            _compositeTransform.ScaleX = Math.Abs(gestureSample.Position.X - gestureSample.Position2.X) / _gestWidth;
                        }

                        //if (Transforms.Children.OfType<CompositeTransform>().Select(x => x.ScaleY).Multiplication() >= 1)
                        {
                            _compositeTransform.ScaleY = Math.Abs(gestureSample.Position.Y - gestureSample.Position2.Y) / _gestHeight;
                        }

                    }
                }
                else if(gestureSample.GestureType == GestureType.PinchComplete)
                {
                    _isScaleStarted = false;
                }
                else if (gestureSample.GestureType == GestureType.VerticalDrag || gestureSample.GestureType == GestureType.HorizontalDrag || gestureSample.GestureType == GestureType.FreeDrag)
                {
                    if(!_isDrugStarted)
                    {
                        _compositeTransform = new CompositeTransform();
                        _drugPosition = gestureSample.Position;
                        Transforms.Children.Add(_compositeTransform);
                        _isDrugStarted = true;
                    }
                    else
                    {
                        _compositeTransform.TranslateX = gestureSample.Position.X - _drugPosition.X;
                        _compositeTransform.TranslateY = gestureSample.Position.Y - _drugPosition.Y;
                    }
                }
                else if (gestureSample.GestureType == GestureType.DragComplete)
                {
                    _isDrugStarted = false;
                }
            }
        }
开发者ID:ekutsenko-softheme,项目名称:burndowns,代码行数:58,代码来源:ChartFullscreenView.xaml.cs


示例8: Transform

 private void Transform()
 {
     CompositeTransform compositeTransform = new CompositeTransform();
     compositeTransform.Rotation = _angle;
     compositeTransform.CenterY = _arrowImage.Height/2;
     compositeTransform.TranslateX = _position.X;
     compositeTransform.TranslateY = _position.Y;
     _arrowImage.RenderTransform = compositeTransform;
 }
开发者ID:Friki,项目名称:Soccer,代码行数:9,代码来源:Arrow.cs


示例9: GameScreen

 protected GameScreen()
 {
     ScreenState = ScreenState.TransitionOn;
     TransitionPosition = 1;
     TransitionOffTime = TimeSpan.FromSeconds(0.5);
     TransitionOnTime = TimeSpan.FromSeconds(0.5);
     DebugCanvas = null;
     TxtDebug = null;
     Transform = new CompositeTransform();
 }
开发者ID:hilts-vaughan,项目名称:Farseer-Physics,代码行数:10,代码来源:GameScreen.cs


示例10: OnNavigatedFrom

 protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
 {
     if (_temp != null )
     {
         var ct = new CompositeTransform();
         ct.TranslateX = -10;
         _temp.RenderTransform = ct;
         _temp = null;
     }
     base.OnNavigatedFrom(e);
 }
开发者ID:gracepig,项目名称:SmartReader,代码行数:11,代码来源:BookListPage.xaml.cs


示例11: AnimateOneItem

 private void AnimateOneItem(object sender, GestureEventArgs e)
 {
     var grid = sender as Grid;
     if (null != grid)
     {
         var ct = new CompositeTransform();
         ct.TranslateX = 10;
         grid.RenderTransform = ct;
         _temp = grid;
     }
 }
开发者ID:gracepig,项目名称:SmartReader,代码行数:11,代码来源:BookListPage.xaml.cs


示例12: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MySchoolApp;component/CampusMapPage.xaml", System.UriKind.Relative));
     this.pageImage = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("pageImage")));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.MyImage = ((System.Windows.Controls.Image)(this.FindName("MyImage")));
     this.transform = ((System.Windows.Media.CompositeTransform)(this.FindName("transform")));
 }
开发者ID:luqmaan,项目名称:usf-mobile,代码行数:11,代码来源:CampusMapPage.g.i.cs


示例13: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SmartLib;component/ScanPage2.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this._previewRect = ((System.Windows.Shapes.Rectangle)(this.FindName("_previewRect")));
     this.previewVideo = ((System.Windows.Media.VideoBrush)(this.FindName("previewVideo")));
     this._previewTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("_previewTransform")));
 }
开发者ID:chovik,项目名称:SmartLib-WP7,代码行数:11,代码来源:ScanPage2.g.cs


示例14: CreateDefaultScaleTransform

 private CompositeTransform CreateDefaultScaleTransform(FrameworkElement uie)
 {
     CompositeTransform trans = new CompositeTransform();
     double xScale = _zoomer.ZoomableContent.ActualWidth / uie.ActualWidth;
     double yScale = _zoomer.ZoomableContent.ActualHeight / uie.ActualHeight;
     if (!double.IsInfinity(xScale) || !double.IsInfinity(yScale))
     {
         trans.ScaleX = trans.ScaleY = Math.Min(xScale, yScale);
     }
     return trans;
 }
开发者ID:halllo,项目名称:SilverlightRun,代码行数:11,代码来源:ColdZoomContent.cs


示例15: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ARSampleApp;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.videoRectangle = ((System.Windows.Shapes.Rectangle)(this.FindName("videoRectangle")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.videoBrushTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("videoBrushTransform")));
     this.arPanel = ((SharpGIS.AR.Controls.ARPanel)(this.FindName("arPanel")));
 }
开发者ID:Chengxuan,项目名称:BThere,代码行数:12,代码来源:MainPage.g.cs


示例16: RotateDynaImage

        public static ImageSource RotateDynaImage(ImageSource imageSrc, double Angle)
        {
            Image image = new Image();
            image.Source = imageSrc;

            CompositeTransform RT = new CompositeTransform();
            RT = (CompositeTransform)image.RenderTransform;
            RT.Rotation += Angle;
            image.RenderTransform = RT;

            return image.Source;
        }
开发者ID:dannisliang,项目名称:Easy_Hologram_4d,代码行数:12,代码来源:Utility.cs


示例17: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/BloodType;component/Views/ImagePreviewView.xaml", System.UriKind.Relative));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.screenArea = ((System.Windows.Controls.Canvas)(this.FindName("screenArea")));
     this.BackgroundImage = ((System.Windows.Controls.Image)(this.FindName("BackgroundImage")));
     this.MyMustacheTransformation = ((System.Windows.Media.CompositeTransform)(this.FindName("MyMustacheTransformation")));
     this.TB1 = ((System.Windows.Controls.TextBlock)(this.FindName("TB1")));
 }
开发者ID:alexandrecz,项目名称:BloodType,代码行数:12,代码来源:ImagePreviewView.g.cs


示例18: GetBitmapImage

        public static BitmapImage GetBitmapImage(int[] ImageSrc)
        {
            var wb = new WriteableBitmap(100, 100);
            for (int i = 0; i < wb.Pixels.Length; i++) {
                wb.Pixels[i] = 0xFF3300;
            }
            var bmp = new BitmapImage();
            using (var ms = new MemoryStream()) {
                wb.SaveJpeg(ms, 100, 100, 0, 100);
                bmp.SetSource(ms);
            }

            var bi = new BitmapImage();
            if (ImageSrc != null && ImageSrc.Length >= 0) {
                var ris = new WriteableBitmap(450, 250);

                //get image from database
                for (int i = 0; i < ImageSrc.Length; i++) {
                    ris.Pixels[i] = ImageSrc[i];
                }

                //put the image in a WritableBitmap
                using (var ms = new MemoryStream()) {
                    ris.SaveJpeg(ms, 450, 250, 0, 100);
                    bi.SetSource(ms);
                }

                //crop the image to 100x100 and centered
                var img = new Image {
                    Source = bi,
                    Width = 450,
                    Height = 250
                };
                var wb2 = new WriteableBitmap(100, 100);
                var t = new CompositeTransform {
                    ScaleX = 0.5,
                    ScaleY = 0.5,
                    TranslateX = -((450 / 2) / 2 - 50),
                    TranslateY = -((250 / 2) / 2 - 50)
                };
                wb2.Render(img, t);
                wb2.Invalidate();
                bi = new BitmapImage();
                using (var ms = new MemoryStream()) {
                    wb2.SaveJpeg(ms, 100, 100, 0, 100);
                    bi.SetSource(ms);
                }
                //BitmapImage bi is now cropped
            } else {
                bi = bmp; //Default image.
            }
            return bi;
        }
开发者ID:tymiles003,项目名称:FieldService,代码行数:53,代码来源:BitmapConverter.cs


示例19: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Lector%20Codigos;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this._previewRect = ((System.Windows.Shapes.Rectangle)(this.FindName("_previewRect")));
     this._previewVideo = ((System.Windows.Media.VideoBrush)(this.FindName("_previewVideo")));
     this._previewTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("_previewTransform")));
     this._matchesList = ((System.Windows.Controls.ListBox)(this.FindName("_matchesList")));
 }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:12,代码来源:MainPage.g.cs


示例20: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneToolkitSample;component/Samples/GestureSample.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
     this.flickData = ((System.Windows.Controls.TextBlock)(this.FindName("flickData")));
     this.border = ((System.Windows.Controls.Border)(this.FindName("border")));
     this.transform = ((System.Windows.Media.CompositeTransform)(this.FindName("transform")));
 }
开发者ID:jeremejevs,项目名称:milk-manager,代码行数:12,代码来源:GestureSample.g.i.cs



注:本文中的System.Windows.Media.CompositeTransform类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Media.Drawing类代码示例发布时间:2022-05-26
下一篇:
C# Media.Color类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap