public void HideWebsite() { if (ProjectionWindows.Count > 0) { foreach (var pw in ProjectionWindows) { pw.HideWebsite(); } ProjectionChanged?.Invoke(this, new ProjectionChangedEventArgs { Image = ProjectionWindows[0].GetPreviewImage() }); } }
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() }); } }
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() }); } }
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() }); } }
private void UpdatePerspectiveMatrix(float width, float height) { _projectionMatrix = Matrix4x4.CreatePerspectiveFieldOfView(_fov, width / height, _near, _far); ProjectionChanged?.Invoke(_projectionMatrix); }
protected virtual void OnProjectionChanged() { ProjectionChanged?.Invoke(this, EventArgs.Empty); }