Packages

  • package root
    Definition Classes
    root
  • package hevs
    Definition Classes
    root
  • package graphics

    A library used for teaching computer science in the ISC degree programme, notably for the course _101.1 Imperative programming_.

    A library used for teaching computer science in the ISC degree programme, notably for the course _101.1 Imperative programming_.

    The library provides classes for simple graphical drawing, with primitives such as points and lines drawing, simple text with different fonts, ... Input primitives are also available using keyboard or mouse. Several examples are also provided.

    Overview

    Here is how to create a window and draw a circle on it using FunGraphics :

    val f = new FunGraphics(400, 300)
    f.drawCircle(200,150, 50)
    Definition Classes
    hevs
  • package advanced
    Definition Classes
    graphics
  • package interfaces
    Definition Classes
    graphics
  • package samples
    Definition Classes
    graphics
  • package utils
    Definition Classes
    graphics
  • DisplaySetup
  • GraphicTimer
  • GraphicsBitmap
  • RepeatingReleasedEventsFixer

package utils

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. class GraphicTimer extends AnyRef

    Provides a way to get a fixed frame rate when calling the sync method in the game loop with the desired frame rate

    Provides a way to get a fixed frame rate when calling the sync method in the game loop with the desired frame rate

    Adapted from http://www.java-gaming.org/index.php?topic=22933.5

  2. class GraphicsBitmap extends AnyRef

    GraphicsBitmap contains the methods required to create a BufferedImage from a String if the file exists

    GraphicsBitmap contains the methods required to create a BufferedImage from a String if the file exists

    1.3 : Added acceleration for images using graphics card

    Version

    1.3, April 2011

  3. class RepeatingReleasedEventsFixer extends AWTEventListener

Value Members

  1. object DisplaySetup

    Checks that a graphical display can be reached before the first window is created and explains what to do when it cannot.

    Checks that a graphical display can be reached before the first window is created and explains what to do when it cannot.

    On Linux, the standard JDK only talks to X11. On a Wayland desktop (Fedora, Ubuntu, ...) that works through Xwayland, except when the program runs in a sandbox that was not given X11 access. The typical case is IntelliJ IDEA installed as a Flatpak: the IDE itself runs natively on Wayland, but the student's program then fails with java.awt.AWTError: Can't connect to X11 window server.

    Two things are done here:

    • if the JDK ships a Wayland toolkit (the JetBrains Runtime does) and X11 is clearly unavailable, that toolkit is selected so that the program works anyway;
    • if opening the display fails, a diagnosis with the probable cause and the fix is printed on the standard error output before the error is rethrown.
  2. object RepeatingReleasedEventsFixer

    Fixes the discrepancies between keyboard handling under Windows and linux for repeated keys.

    Fixes the discrepancies between keyboard handling under Windows and linux for repeated keys. Taken from http://tech.stolsvik.com/2010/05/linux-java-repeats-released-keyevents.html

Ungrouped