"textStyle();" - Processing

ID Autor Duplicat din Ultima modificare
#357 Candale Silviu (silviu) - Duminica, 19 iun 2016, 10:15

Această funcție stabilește stilul textului: normal, italic sau bold.

Sintaxă:

textStyle(stil);

Parametri:

  • stil – stabilește stilul textului. Poate fi: NORMAL, ITALIC sau BOLD
x
 
1
function setup() {
2
    createCanvas(400, 400);
3
    noLoop();
4
}
5
6
function draw() {
7
    text("Processing JS - implicit", 100, 50);
8
  
9
    textStyle(ITALIC);
10
    text("Processing JS - italic", 100, 150);
11
  
12
    textStyle(BOLD);
13
    text("Processing JS - bold", 100, 250);
14
  
15
    textStyle(NORMAL);
16
    text("Processing JS - normal", 100, 350);
17
}
18
Du-te sus!