示例#1
0
 internal CanvasFrame\u00241([In] CanvasFrame obj0, [In] DisplayMode obj1, [In] bool obj2, [In] double obj3)
 {
   int num = obj2 ? 1 : 0;
   this.this\u00240 = obj0;
   this.val\u0024displayMode = obj1;
   this.val\u0024fullScreen = num != 0;
   this.val\u0024gamma = obj3;
   base.\u002Ector();
 }
示例#2
0
 public CanvasFrame(string title, int screenNumber, DisplayMode displayMode, double gamma)
 {
   base.\u002Ector(title, CanvasFrame.getScreenDevice(screenNumber).getDefaultConfiguration());
   CanvasFrame canvasFrame = this;
   this.latency = 120L;
   this.keyEvent = (KeyEvent) null;
   this.canvas = (Canvas) null;
   this.needInitialResize = false;
   this.bufferStrategy = (BufferStrategy) null;
   this.init(true, displayMode, gamma);
 }
示例#3
0
 public virtual void run()
 {
   GraphicsDevice device = ((Component) this.this\u00240).getGraphicsConfiguration().getDevice();
   DisplayMode displayMode1 = device.getDisplayMode();
   DisplayMode displayMode2 = (DisplayMode) null;
   if (this.val\u0024displayMode != null && displayMode1 != null)
   {
     int width = this.val\u0024displayMode.getWidth();
     int height = this.val\u0024displayMode.getHeight();
     int bitDepth = this.val\u0024displayMode.getBitDepth();
     int refreshRate = this.val\u0024displayMode.getRefreshRate();
     displayMode2 = new DisplayMode(width <= 0 ? displayMode1.getWidth() : width, height <= 0 ? displayMode1.getHeight() : height, bitDepth <= 0 ? displayMode1.getBitDepth() : bitDepth, refreshRate <= 0 ? displayMode1.getRefreshRate() : refreshRate);
   }
   if (this.val\u0024fullScreen)
   {
     ((Frame) this.this\u00240).setUndecorated(true);
     this.this\u00240.getRootPane().setWindowDecorationStyle(0);
     ((Frame) this.this\u00240).setResizable(false);
     device.setFullScreenWindow((Window) this.this\u00240);
   }
   if (displayMode2 != null && !displayMode2.equals(displayMode1))
     device.setDisplayMode(displayMode2);
   double num = this.val\u0024gamma != 0.0 ? this.val\u0024gamma : CanvasFrame.getGamma(device);
   CanvasFrame.access\u0024002(this.this\u00240, num != 0.0 ? 1.0 / num : 1.0);
   ((Window) this.this\u00240).setVisible(true);
   CanvasFrame.access\u0024102(this.this\u00240, (Canvas) new CanvasFrame\u00241\u00241(this));
   if (this.val\u0024fullScreen)
   {
     ((Component) CanvasFrame.access\u0024100(this.this\u00240)).setSize(((Component) this.this\u00240).getSize());
     CanvasFrame.access\u0024302(this.this\u00240, false);
   }
   else
     CanvasFrame.access\u0024302(this.this\u00240, true);
   this.this\u00240.getContentPane().add((Component) CanvasFrame.access\u0024100(this.this\u00240));
   ((Component) CanvasFrame.access\u0024100(this.this\u00240)).setVisible(true);
   CanvasFrame.access\u0024100(this.this\u00240).createBufferStrategy(2);
   CanvasFrame.access\u0024202(this.this\u00240, CanvasFrame.access\u0024100(this.this\u00240).getBufferStrategy());
   KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher((KeyEventDispatcher) new CanvasFrame\u00241\u00242(this));
 }
示例#4
0
 public CanvasFrame(string title, int screenNumber, DisplayMode displayMode)
   : this(title, screenNumber, displayMode, 0.0)
 {
 }
		/// <summary>
		/// 
		/// </summary>
		public bool equals(DisplayMode @dm)
		{
			return default(bool);
		}
		/// <summary>
		/// Sets the display mode of this graphics device.
		/// </summary>
		public void setDisplayMode(DisplayMode @dm)
		{
		}
 public virtual CanvasFrame createCanvasFrame()
 {
   if (this.settings.getScreenNumber() < 0)
     return (CanvasFrame) null;
   DisplayMode displayMode = new DisplayMode(this.settings.getImageWidth(), this.settings.getImageHeight(), this.settings.getBitDepth(), this.settings.getRefreshRate());
   CanvasFrame.__\u003Cclinit\u003E();
   CanvasFrame canvasFrame = new CanvasFrame(this.settings.getName(), this.settings.getScreenNumber(), displayMode, this.settings.getResponseGamma());
   canvasFrame.setLatency(this.settings.getLatency());
   Dimension canvasSize = canvasFrame.getCanvasSize();
   if (canvasSize.width != this.imageWidth || canvasSize.height != this.imageHeight)
     this.rescale((int) canvasSize.width, (int) canvasSize.height);
   return canvasFrame;
 }