Пример #1
0
 public void HideWebsite()
 {
     if (ProjectionWindows.Count > 0)
     {
         foreach (var pw in ProjectionWindows)
         {
             pw.HideWebsite();
         }
         ProjectionChanged?.Invoke(this, new ProjectionChangedEventArgs {
             Image = ProjectionWindows[0].GetPreviewImage()
         });
     }
 }
Пример #2
0
 public void DisplayWebsite(Uri uri)
 {
     if (ProjectionWindows.Count > 0)
     {
         foreach (var pw in ProjectionWindows)
         {
             pw.ShowWebsite(uri);
         }
         ProjectionChanged?.Invoke(this, new ProjectionChangedEventArgs {
             Image = ProjectionWindows[0].GetPreviewImage()
         });
     }
 }
Пример #3
0
        public void DisplayText(TextLayer layerContent, int fadetime)
        {
            if (ProjectionWindows.Count > 0)
            {
                foreach (var pw in ProjectionWindows)
                {
                    Bitmap   bmp = new Bitmap(pw.Width, pw.Height);
                    Graphics gr  = Graphics.FromImage(bmp);
                    layerContent.WriteOut(gr);

                    pw.DisplayText(bmp, fadetime);

                    CurrentText = layerContent;
                }
                ProjectionChanged?.Invoke(this, new ProjectionChangedEventArgs {
                    Image = ProjectionWindows[0].GetPreviewImage()
                });
            }
        }
Пример #4
0
        public void DisplayImage(ImageLayer layerContent, int fadetime)
        {
            if (ChromaKeyingEnabled)
            {
                layerContent = new ImageLayer(Settings.Default.ChromaKeyingColor);
            }
            layerContent.ImageFit = Settings.Default.ProjectionBackgroundImageFit;
            if (ProjectionWindows.Count > 0)
            {
                foreach (var pw in ProjectionWindows)
                {
                    Bitmap   bmp = new Bitmap(pw.Width, pw.Height);
                    Graphics gr  = Graphics.FromImage(bmp);
                    layerContent.WriteOut(gr);

                    pw.DisplayImage(bmp, fadetime);

                    CurrentImage = layerContent;
                }
                ProjectionChanged?.Invoke(this, new ProjectionChangedEventArgs {
                    Image = ProjectionWindows[0].GetPreviewImage()
                });
            }
        }
Пример #5
0
 private void UpdatePerspectiveMatrix(float width, float height)
 {
     _projectionMatrix = Matrix4x4.CreatePerspectiveFieldOfView(_fov, width / height, _near, _far);
     ProjectionChanged?.Invoke(_projectionMatrix);
 }
Пример #6
0
 protected virtual void OnProjectionChanged()
 {
     ProjectionChanged?.Invoke(this, EventArgs.Empty);
 }