Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
600c6f4
New translations all_features.png (French)
majamanojlovic Jan 20, 2022
a5c1859
New translations meta.yml (Kannada)
majamanojlovic Jan 20, 2022
9cb591f
New translations meta.yml (Greek)
majamanojlovic Jan 20, 2022
9c1f523
New translations meta.yml (Japanese)
majamanojlovic Jan 20, 2022
560f860
New translations meta.yml (Dutch)
majamanojlovic Jan 20, 2022
80d1bfc
New translations meta.yml (Polish)
majamanojlovic Jan 20, 2022
d6d276c
New translations meta.yml (Russian)
majamanojlovic Jan 20, 2022
379398d
New translations meta.yml (Portuguese, Brazilian)
majamanojlovic Jan 20, 2022
cd88725
New translations meta.yml (Marathi)
majamanojlovic Jan 20, 2022
7482efc
New translations meta.yml (Hindi)
majamanojlovic Jan 20, 2022
10717b3
New translations meta.yml (Welsh)
majamanojlovic Jan 20, 2022
8c70917
New translations meta.yml (Spanish, Latin America)
majamanojlovic Jan 20, 2022
dddc456
New translations meta.yml (French)
majamanojlovic Jan 20, 2022
67263c1
New translations step_1.md (French)
majamanojlovic Jan 20, 2022
545611a
New translations step_1.md (Arabic)
majamanojlovic Jan 20, 2022
056d722
New translations step_1.md (Greek)
majamanojlovic Jan 20, 2022
2c66ccf
New translations step_1.md (Japanese)
majamanojlovic Jan 20, 2022
7161a29
New translations step_1.md (Dutch)
majamanojlovic Jan 20, 2022
83459b8
New translations step_1.md (Polish)
majamanojlovic Jan 20, 2022
800808c
New translations step_1.md (Russian)
majamanojlovic Jan 20, 2022
dcce2ba
New translations step_1.md (Portuguese, Brazilian)
majamanojlovic Jan 20, 2022
70e7a6a
New translations step_1.md (Marathi)
majamanojlovic Jan 20, 2022
ecd0f3d
New translations step_1.md (Hindi)
majamanojlovic Jan 20, 2022
9b78e16
New translations meta.yml (Arabic)
majamanojlovic Jan 20, 2022
621f549
New translations text_grid.png (Spanish, Latin America)
majamanojlovic Jan 20, 2022
05b935a
New translations all_features.png (Arabic)
majamanojlovic Jan 20, 2022
6c0ba5e
New translations all_features.png (Spanish, Latin America)
majamanojlovic Jan 20, 2022
dc8760a
New translations all_features.png (Greek)
majamanojlovic Jan 20, 2022
7194f9f
New translations all_features.png (Japanese)
majamanojlovic Jan 20, 2022
cd330c0
New translations all_features.png (Dutch)
majamanojlovic Jan 20, 2022
38a352e
New translations all_features.png (Polish)
majamanojlovic Jan 20, 2022
eaf7901
New translations all_features.png (Russian)
majamanojlovic Jan 20, 2022
8009118
New translations all_features.png (Portuguese, Brazilian)
majamanojlovic Jan 20, 2022
2ea4cb0
New translations all_features.png (Marathi)
majamanojlovic Jan 20, 2022
17b0148
New translations all_features.png (Hindi)
majamanojlovic Jan 20, 2022
f11a344
New translations all_features.png (Welsh)
majamanojlovic Jan 20, 2022
a6d6f52
New translations all_features.png (Kannada)
majamanojlovic Jan 20, 2022
266de46
New translations text_grid.png (French)
majamanojlovic Jan 20, 2022
e20d38a
New translations text_grid.png (Kannada)
majamanojlovic Jan 20, 2022
280c2be
New translations text_grid.png (Arabic)
majamanojlovic Jan 20, 2022
d816ffe
New translations text_grid.png (Greek)
majamanojlovic Jan 20, 2022
bb59487
New translations text_grid.png (Japanese)
majamanojlovic Jan 20, 2022
5bf9a92
New translations text_grid.png (Dutch)
majamanojlovic Jan 20, 2022
327a03e
New translations text_grid.png (Polish)
majamanojlovic Jan 20, 2022
0c92569
New translations text_grid.png (Russian)
majamanojlovic Jan 20, 2022
b2b2d10
New translations text_grid.png (Portuguese, Brazilian)
majamanojlovic Jan 20, 2022
65912a4
New translations text_grid.png (Marathi)
majamanojlovic Jan 20, 2022
76ec30f
New translations text_grid.png (Hindi)
majamanojlovic Jan 20, 2022
e95aa6e
New translations text_grid.png (Welsh)
majamanojlovic Jan 20, 2022
3d0338b
New translations step_1.md (Welsh)
majamanojlovic Jan 20, 2022
d624a5d
New translations step_1.md (Kannada)
majamanojlovic Jan 20, 2022
6772daf
New translations step_1.md (Spanish, Latin America)
majamanojlovic Jan 20, 2022
4e39b70
New translations all_features.png (English)
majamanojlovic Jan 20, 2022
4ea82f3
New translations text_grid.png (English)
majamanojlovic Jan 20, 2022
d7a0fbf
New translations meta.yml (English)
majamanojlovic Jan 20, 2022
28a9621
New translations step_1.md (English)
majamanojlovic Jan 20, 2022
6c982f2
New translations all_features.png (French)
majamanojlovic Mar 4, 2022
89e0d0f
New translations meta.yml (French)
majamanojlovic Mar 4, 2022
0b653be
New translations meta.yml (Arabic)
majamanojlovic Mar 4, 2022
b257fd6
New translations meta.yml (Greek)
majamanojlovic Mar 4, 2022
55e73b0
New translations meta.yml (Japanese)
majamanojlovic Mar 4, 2022
f666ab8
New translations meta.yml (Dutch)
majamanojlovic Mar 4, 2022
cdc7196
New translations meta.yml (Spanish, Latin America)
majamanojlovic Mar 4, 2022
ae788f9
New translations step_1.md (French)
majamanojlovic Mar 4, 2022
d1a6c1e
New translations step_1.md (Arabic)
majamanojlovic Mar 4, 2022
11433e9
New translations step_1.md (Greek)
majamanojlovic Mar 4, 2022
f120ef1
New translations step_1.md (Japanese)
majamanojlovic Mar 4, 2022
efec781
New translations step_1.md (Dutch)
majamanojlovic Mar 4, 2022
bad0a74
New translations text_grid.png (Spanish, Latin America)
majamanojlovic Mar 4, 2022
b106425
New translations all_features.png (Greek)
majamanojlovic Mar 4, 2022
28faad5
New translations all_features.png (Japanese)
majamanojlovic Mar 4, 2022
e7ed00c
New translations all_features.png (Dutch)
majamanojlovic Mar 4, 2022
30db200
New translations all_features.png (Spanish, Latin America)
majamanojlovic Mar 4, 2022
52e5433
New translations text_grid.png (French)
majamanojlovic Mar 4, 2022
c30e03f
New translations text_grid.png (Greek)
majamanojlovic Mar 4, 2022
e73b3c9
New translations text_grid.png (Japanese)
majamanojlovic Mar 4, 2022
fc5ee27
New translations text_grid.png (Dutch)
majamanojlovic Mar 4, 2022
fe3c44a
New translations step_1.md (Spanish, Latin America)
majamanojlovic Mar 4, 2022
95304e0
New translations step_1.md (Arabic)
majamanojlovic Mar 15, 2022
4ecf998
New translations meta.yml (Portuguese, Brazilian)
majamanojlovic May 10, 2022
e270597
New translations step_1.md (Arabic)
majamanojlovic May 10, 2022
c5d418c
New translations all_features.png (Arabic)
majamanojlovic May 10, 2022
30ddb49
New translations all_features.png (Portuguese, Brazilian)
majamanojlovic May 10, 2022
b56d317
New translations text_grid.png (Arabic)
majamanojlovic May 10, 2022
8a77f57
New translations text_grid.png (Portuguese, Brazilian)
majamanojlovic May 10, 2022
aba12a2
New translations step_1.md (Portuguese, Brazilian)
majamanojlovic May 10, 2022
9ca221d
New translations meta.yml (Welsh)
majamanojlovic May 17, 2022
7c88a10
New translations text_grid.png (Welsh)
majamanojlovic May 17, 2022
62ad1cb
New translations all_features.png (Welsh)
majamanojlovic May 17, 2022
9462dd0
New translations step_1.md (Welsh)
majamanojlovic May 17, 2022
e134dd3
New translations meta.yml (Ukrainian)
majamanojlovic Nov 3, 2022
6f7c72d
New translations all_features.png (Ukrainian)
majamanojlovic Nov 3, 2022
b9e8007
New translations text_grid.png (Ukrainian)
majamanojlovic Nov 3, 2022
20a3f5e
New translations step_1.md (Ukrainian)
majamanojlovic Nov 3, 2022
741b7dc
New translations all_features.png (Ukrainian)
majamanojlovic Feb 23, 2023
2b196bd
New translations text_grid.png (Ukrainian)
majamanojlovic Feb 23, 2023
0eb4485
New translations meta.yml (Polish)
majamanojlovic Feb 23, 2023
c8d8c36
New translations meta.yml (Ukrainian)
majamanojlovic Feb 23, 2023
26f8b79
New translations step_1.md (Polish)
majamanojlovic Feb 23, 2023
c9b74f0
New translations step_1.md (Ukrainian)
majamanojlovic Feb 23, 2023
d77b42e
New translations all_features.png (Polish)
majamanojlovic Mar 21, 2023
43b576c
New translations text_grid.png (Polish)
majamanojlovic Mar 21, 2023
5ddd1e2
New translations all_features.png (Italian)
sashamishcheriakova Jan 5, 2024
5089969
New translations text_grid.png (Italian)
sashamishcheriakova Jan 5, 2024
f930bd6
New translations meta.yml (Italian)
sashamishcheriakova Jan 5, 2024
87c2b08
New translations step_1.md (Italian)
sashamishcheriakova Jan 5, 2024
68c810e
New translations all_features.png (Italian)
sashamishcheriakova Jan 18, 2024
a557259
New translations text_grid.png (Italian)
sashamishcheriakova Jan 18, 2024
a08ccdb
New translations meta.yml (Italian)
sashamishcheriakova Jan 18, 2024
b5cfc84
New translations step_1.md (Italian)
sashamishcheriakova Jan 18, 2024
fcf756c
New translations step_1.md (Polish)
sashamishcheriakova Jan 18, 2024
ee7a084
New translations step_1.md (Italian)
sashamishcheriakova Jan 20, 2024
fd5a13e
New translations step_1.md (Polish)
sashamishcheriakova Feb 9, 2024
adaf5bf
New translations all_features.png (German)
sashamishcheriakova Apr 24, 2025
36aa414
New translations text_grid.png (German)
sashamishcheriakova Apr 24, 2025
4d2eff6
New translations meta.yml (German)
sashamishcheriakova Apr 24, 2025
1d144f7
New translations step_1.md (German)
sashamishcheriakova Apr 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added ar-SA/images/all_features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ar-SA/images/text_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions ar-SA/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: أنشئ نصًا
hero_image: images/banner.png
description: أنشئ نصًا
version: 4
listed: false
copyedit: false
last_tested: "2021-09-27"
steps:
-
title: أنشئ نصًا
51 changes: 51 additions & 0 deletions ar-SA/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ارسم نصًا باستخدام: `text('النص المراد عرضه', x, y)`

سيتم رسم النص باستخدام القيمة `fill` التي قمت بتعيينها قبل استدعاء `text`.

```python

text('نصك', 250, 50)

```

سيتم وضع النص عند إحداثيات (y ، x) المعطاة من الرقمين.

![يظهر "نصك" على شبكة مؤشر في موضع (250 ، 50) في الزاوية اليسرى السفلية.](images/text_grid.png)

يمكنك أيضًا تعديل النص باستخدام:

```python

text_align(horizontal_position, vertical_position)

```

الذي يعدل موضع النص داخل المربع غير المرئي الذي تقوم بإنشائه عند الإحداثيات الهدف. يتضمن P5 متغيرات خاصة لكل موضع قد ترغب في استخدامه:

- `horizontal_position` of `LEFT` سيحاذي النص إلى يسار مربع النص
- `horizontal_position` of `CENTER` سيؤدي إلى توسيط النص أفقيًا في مربع النص
- `horizontal_position` of `RIGHT` سيحاذي النص إلى يمين مربع النص
- `vertical_position` of `TOP` سيحاذي النص إلى أعلى مربع النص
- `vertical_position` of `CENTER` سيحاذي النص إلى منتصف مربع النص
- `vertical_position` of `BOTTOM` سيحاذي النص إلى أسفل مربع النص

```python

text_size(size)

```

الذي يقبل عددًا بالبكسل يمثل حجم الخط الذي تريده.

على سبيل المثال ، لإنشاء كلمة "مرحبًا" ، بنص أحمر يبلغ ارتفاعه 16 بكسل ، يتم توسيطه على لوحة 400 ، 400 ، يمكنك استخدام:

```python

fill(200, 0, 0)
text_size(16)
text_align(CENTER, CENTER)
text('Hello', 200, 200)

```

![تظهر كلمة "مرحبًا" بخط أحمر في وسط شبكة مؤشرة (200 ، 200).](images/all_features.png)
Binary file added cy-GB/images/all_features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cy-GB/images/text_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions cy-GB/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Creu testun
hero_image: images/banner.png
description: Creu testun
version: 4
listed: false
copyedit: false
last_tested: "2021-09-27"
steps:
-
title: Creu testun
51 changes: 51 additions & 0 deletions cy-GB/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Lluniwch destun gan ddefnyddio: `text('Text to display', x, y)`

Bydd y testun yn cael ei lunio gan ddefnyddio'r gwerth `fill` rydych chi wedi'i osod cyn bod `text` yn cael ei galw.

```python

text('Eich testun', 250, 50)

```

Bydd y testun wedi'i leoli yn y cyfesurynnau (x, y) sy'n cael eu rhoi gan y ddau rif.

!['Eich testun' ar grid gyda'r safle (250, 50) wedi'i farcio yn ei gornel chwith isaf.](images/text_grid.png)

Fe allwch chi hefyd addasu'r testun drwy ddefnyddio:

```python

text_align(horizontal_position, vertical_position)

```

Mae hyn yn addasu safle'r testun tu mewn i'r bocs anweledig rydych chi'n ei greu yn y cyfesurynnau targed. Mae P5 yn cynnwys newidynnau arbennig ar gyfer pob safle byddwch chi eisiau eu defnyddio o bosib:

- Bydd `horizontal_position` `LEFT` yn alinio'r testun i chwith y blwch testun
- Bydd `horizontal_position` `CENTER` yn canoli'r testun yn y blwch testun yn llorweddol
- Bydd `horizontal_position` `RIGHT` yn alinio'r testun i dde y blwch testun
- Bydd `vertical_position` `TOP` yn alinio'r testun i frig y blwch testun
- Bydd `vertical_position` `CENTER` yn alinio'r testun i ganol y blwch testun
- Bydd `vertical_position` `BOTTOM` yn alinio'r testun i waelod y blwch testun

```python

text_size(size)

```

Sy'n derbyn nifer mewn picseli sy'n cynrychioli'r maint ffont o'ch dewis.

Er enghraifft, i greu'r gair "Helo" mewn testun coch 16 picsel, wedi'i ganoli ar ganfas 400, 400, byddech chi'n defnyddio:

```python

fill(200, 0, 0)
text_size(16)
text_align(CENTER, CENTER)
text('Helo', 200, 200)

```

![Mae 'Helo' yn ymddangos mewn testun coch, wedi'i ganoli ar grid wedi'i farcio (200, 200).](images/all_features.png)
Binary file added de-DE/images/all_features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added de-DE/images/text_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions de-DE/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Create text
hero_image: images/banner.png
description: Create text
version: 4
listed: false
copyedit: false
last_tested: "2021-09-27"
steps:
-
title: Create text
51 changes: 51 additions & 0 deletions de-DE/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Draw text using: `text('Text to display', x, y)`

The text will be drawn using the `fill` value you have set before `text` is called.

```python

text('Your text', 250, 50)

```

The text will be positioned at the (x, y) coordinates given by the two numbers.

!['Your text' appears on a grid with the position (250, 50) marked at its bottom-left corner.](images/text_grid.png)

You can also adjust the text by using:

```python

text_align(horizontal_position, vertical_position)

```

Which adjusts the position of the text inside the invisible box you create at the target coordinates. P5 includes special variables for each of the position you might want to use:

- A `horizontal_position` of `LEFT` will align the text to the left of the text box
- A `horizontal_position` of `CENTER` will horizontally centre the text in the text box
- A `horizontal_position` of `RIGHT` will align the text to the right of the text box
- A `vertical_position` of `TOP` will align the text to the top of the text box
- A `vertical_position` of `CENTER` will align the text to the middle of the text box
- A `vertical_position` of `BOTTOM` will align the text to the bottom of the text box

```python

text_size(size)

```

Which accepts a number in pixels that represents the font size you want.

For example, to create the word "Hello", in red 16 pixel high text, centred on a 400, 400 canvas, you would use:

```python

fill(200, 0, 0)
text_size(16)
text_align(CENTER, CENTER)
text('Hello', 200, 200)

```

!['Hello' appears in red text, centred on a grid marked (200, 200).](images/all_features.png)
Binary file added el-GR/images/all_features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added el-GR/images/text_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions el-GR/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Δημιουργία κειμένου
hero_image: images/banner.png
description: Δημιουργία κειμένου
version: 4
listed: false
copyedit: false
last_tested: "2021-09-27"
steps:
-
title: Δημιουργία κειμένου
51 changes: 51 additions & 0 deletions el-GR/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Σχεδίασε κείμενο χρησιμοποιώντας τη συνάρτηση: `text('Κείμενο προς εμφάνιση', x, y)`

Το κείμενο θα σχεδιαστεί χρησιμοποιώντας την τιμή `fill` που έχεις ορίσει πριν καλέσεις το `text`.

```python

text('Το κείμενό σου', 250, 50)

```

Το κείμενο θα τοποθετηθεί στις συντεταγμένες (x, y) που δίνονται από τους δύο πρώτους αριθμούς.

![Το "κείμενό σου" εμφανίζεται σε ένα πλέγμα με τη θέση (250, 50) σημειωμένη στην κάτω αριστερή γωνία του.](images/text_grid.png)

Μπορείς επίσης να προσαρμόσεις το κείμενο χρησιμοποιώντας:

```python

text_align(horizontal_position, vertical_position)

```

Το οποίο προσαρμόζει τη θέση του κειμένου μέσα στο αόρατο πλαίσιο που δημιουργείς στις συντεταγμένες προορισμού. Η βιβλιοθήκη p5 περιλαμβάνει ειδικές μεταβλητές για κάθε θέση που μπορεί να θέλεις να χρησιμοποιήσεις:

- Μια `horizontal_position` του `LEFT` θα ευθυγραμμίσει το κείμενο στα αριστερά του πλαισίου κειμένου
- Μια `horizontal_position` του `CENTER` θα κεντράρει οριζόντια το κείμενο στο πλαίσιο κειμένου
- Μια `horizontal_position` του `RIGHT` θα ευθυγραμμίσει το κείμενο στα δεξιά του πλαισίου κειμένου
- Μια `vertical_position` του `TOP` θα ευθυγραμμίσει το κείμενο στην κορυφή του πλαισίου κειμένου
- Μια `vertical_position` του `CENTER` θα ευθυγραμμίσει το κείμενο στη μέση του πλαισίου κειμένου
- Μια `vertical_position` του `BOTTOM` θα ευθυγραμμίσει το κείμενο στο κάτω μέρος του πλαισίου κειμένου

```python

text_size(size)

```

Το οποίο δέχεται έναν αριθμό σε εικονοστοιχεία που αντιπροσωπεύει το μέγεθος γραμματοσειράς που θέλεις.

Για παράδειγμα, για να δημιουργήσεις τη λέξη "Γεια", σε κόκκινο κείμενο ύψους 16 pixel, με κέντρο 400, 400, στον καμβά θα χρησιμοποιούσες:

```python

fill(200, 0, 0)
text_size(16)
text_align(CENTER, CENTER)
text('Γεια', 200, 200)

```

![Το "Γεια" εμφανίζεται σε κόκκινο κείμενο, με κέντρο σε ένα πλέγμα με την ένδειξη (200, 200).](images/all_features.png)
Binary file added en-US/images/all_features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added en-US/images/text_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions en-US/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Create text
hero_image: images/banner.png
description: Create text
version: 4
listed: false
copyedit: false
last_tested: "2021-09-27"
steps:
-
title: Create text
51 changes: 51 additions & 0 deletions en-US/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Draw text using: `text('Text to display', x, y)`

The text will be drawn using the `fill` value you have set before `text` is called.

```python

text('Your text', 250, 50)

```

The text will be positioned at the (x, y) coordinates given by the two numbers.

!['Your text' appears on a grid with the position (250, 50) marked at its bottom-left corner.](images/text_grid.png)

You can also adjust the text by using:

```python

text_align(horizontal_position, vertical_position)

```

Which adjusts the position of the text inside the invisible box you create at the target coordinates. P5 includes special variables for each of the position you might want to use:

- A `horizontal_position` of `LEFT` will align the text to the left of the text box
- A `horizontal_position` of `CENTER` will horizontally centre the text in the text box
- A `horizontal_position` of `RIGHT` will align the text to the right of the text box
- A `vertical_position` of `TOP` will align the text to the top of the text box
- A `vertical_position` of `CENTER` will align the text to the middle of the text box
- A `vertical_position` of `BOTTOM` will align the text to the bottom of the text box

```python

text_size(size)

```

Which accepts a number in pixels that represents the font size you want.

For example, to create the word "Hello", in red 16 pixel high text, centred on a 400, 400 canvas, you would use:

```python

fill(200, 0, 0)
text_size(16)
text_align(CENTER, CENTER)
text('Hello', 200, 200)

```

!['Hello' appears in red text, centred on a grid marked (200, 200).](images/all_features.png)
Binary file added es-419/images/all_features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added es-419/images/text_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions es-419/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Agregar texto
hero_image: images/banner.png
description: Agregar texto
version: 4
listed: false
copyedit: false
last_tested: "2021-09-27"
steps:
-
title: Agregar texto
51 changes: 51 additions & 0 deletions es-419/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Puedes agregar texto usando: `text('Texto a mostrar', x, y)`

El texto se creará utilizando el valor que le hayas dado a `fill` (relleno) antes de llamar a la función `text` (texto).

```python

text('Tu texto', 250, 50)

```

El texto se colocará en las coordenadas (x, y) definidas por los dos números.

!['Tu texto' aparece en una cuadrícula con la posición (250, 50) marcada en la esquina inferior izquierda.](images/text_grid.png)

También puedes ajustar la posición del texto usando:

```python

text_align(posicion_horizontal, posicion_vertical)

```

Esta función ajusta la posición del texto dentro del cuadro invisible que creaste en las coordenadas de destino. P5 incluye variables especiales para cualquiera de las posiciones que quieras usar:

- Si defines `posicion_horizontal` como `LEFT` el texto se alineará a la izquierda del cuadro de texto
- Si defines `posicion_horizontal` como `CENTER` el texto se centrará horizontalmente en el cuadro de texto
- Si defines `posicion_horizontal` como `RIGHT` el texto se alineará a la derecha del cuadro de texto
- Si defines `posicion_vertical` como `TOP` el texto se alineará arriba del cuadro de texto
- Si defines `posicion_vertical` como `CENTER` el texto se alineará al medio del cuadro de texto
- Si defines `posicion_vertical` como `BOTTOM` el texto se alineará debajo del cuadro de texto

```python

text_size(tamaño)

```

Esta función acepta un número en píxeles que representa el tamaño de fuente que desees usar.

Por ejemplo, para crear la palabra "Hola", en texto rojo de 16 píxeles de alto, centrado en una cuadrícula de 400 por 400, usarías:

```python

fill(200, 0, 0)
text_size(16)
text_align(CENTER, CENTER)
text('Hola', 200, 200)

```

!['Hola' aparece en texto rojo, centrado en una cuadrícula marcada (200, 200).](images/all_features.png)
Binary file added fr-FR/images/all_features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/text_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions fr-FR/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Créer du texte
hero_image: images/banner.png
description: Créer du texte
version: 4
listed: false
copyedit: false
last_tested: "2021-09-27"
steps:
-
title: Créer du texte
Loading