public class Functions extends Object
Modifier and Type | Method and Description |
---|---|
static void |
drawCircle(double cx,
double cy,
double r,
int c1,
int c2,
int c3)
Trace un cercle de centre (cx, cy) de rayon r et de couleur RGB = (c1, c2,
c3).
|
static Point |
drawImage(String location,
int x,
int y)
Affiche une imagette à un endroit donné et renvoie sa position pour permettre
de la déplacer.
|
static void |
drawLine(double x1,
double y1,
double x2,
double y2,
int c1,
int c2,
int c3)
Trace un segment de droite de (x1, y1) à (x2, y2) et de couleur RGB = (c1,
c2, c3).
|
static void |
drawPixel(double x,
double y,
int c1,
int c2,
int c3)
Peint un pixel en (x, y) de couleur RGB = (c1, c2, c3).
|
static void |
drawRect(double x,
double y,
double a,
double b,
int c1,
int c2,
int c3)
Trace un rectangle de coin supérieur gauche (x, y), de tailles (a, b) et de
couleur RGB = (c1, c2, c3).
|
static Rectangle2D |
drawText(String text,
double x,
double y,
int size,
int c1,
int c2,
int c3)
Écrit un texte au point (x, y) avec une fonte de taille size et la couleur
RGB = (c1, c2, c3).
|
static void |
initDrawing(int w,
int h) |
static void |
initDrawing(String s,
int x,
int y,
int w,
int h)
Initialise le graphique avec un tracé de tailles (w, h).
|
static void |
paintCircle(double cx,
double cy,
double r,
int c1,
int c2,
int c3)
Remplit un cercle de centre (cx, cy) de rayon r avec la couleur RGB = (c1,
c2, c3).
|
static void |
paintRect(double x,
double y,
double a,
double b,
int c1,
int c2,
int c3)
Remplit un rectangle de coin supérieur gauche (x, y), de tailles (a, b) avec
la couleur RGB = (c1, c2, c3).
|
static void |
showImage(String location)
Affiche une image stockée dans le fichier à la location donnée.
|
public static void initDrawing(String s, int x, int y, int w, int h)
public static void initDrawing(int w, int h)
initDrawing(String, int, int, int, int)
public static void drawPixel(double x, double y, int c1, int c2, int c3)
public static void drawRect(double x, double y, double a, double b, int c1, int c2, int c3)
public static void paintRect(double x, double y, double a, double b, int c1, int c2, int c3)
public static void drawLine(double x1, double y1, double x2, double y2, int c1, int c2, int c3)
public static void drawCircle(double cx, double cy, double r, int c1, int c2, int c3)
public static void paintCircle(double cx, double cy, double r, int c1, int c2, int c3)
public static Point drawImage(String location, int x, int y)
public static Rectangle2D drawText(String text, double x, double y, int size, int c1, int c2, int c3)
public static void showImage(String location)
Copyright © 2024. All rights reserved.