diff --git a/ar-SA/images/all_features.png b/ar-SA/images/all_features.png new file mode 100644 index 0000000..950824a Binary files /dev/null and b/ar-SA/images/all_features.png differ diff --git a/ar-SA/images/text_grid.png b/ar-SA/images/text_grid.png new file mode 100644 index 0000000..9cccad9 Binary files /dev/null and b/ar-SA/images/text_grid.png differ diff --git a/ar-SA/meta.yml b/ar-SA/meta.yml new file mode 100644 index 0000000..766b377 --- /dev/null +++ b/ar-SA/meta.yml @@ -0,0 +1,11 @@ +--- +title: أنشئ نصًا +hero_image: images/banner.png +description: أنشئ نصًا +version: 4 +listed: false +copyedit: false +last_tested: "2021-09-27" +steps: + - + title: أنشئ نصًا diff --git a/ar-SA/step_1.md b/ar-SA/step_1.md new file mode 100644 index 0000000..f0f2e31 --- /dev/null +++ b/ar-SA/step_1.md @@ -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) diff --git a/cy-GB/images/all_features.png b/cy-GB/images/all_features.png new file mode 100644 index 0000000..96c08df Binary files /dev/null and b/cy-GB/images/all_features.png differ diff --git a/cy-GB/images/text_grid.png b/cy-GB/images/text_grid.png new file mode 100644 index 0000000..6648315 Binary files /dev/null and b/cy-GB/images/text_grid.png differ diff --git a/cy-GB/meta.yml b/cy-GB/meta.yml new file mode 100644 index 0000000..5c52d78 --- /dev/null +++ b/cy-GB/meta.yml @@ -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 diff --git a/cy-GB/step_1.md b/cy-GB/step_1.md new file mode 100644 index 0000000..07af756 --- /dev/null +++ b/cy-GB/step_1.md @@ -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) diff --git a/de-DE/images/all_features.png b/de-DE/images/all_features.png new file mode 100644 index 0000000..dea63c9 Binary files /dev/null and b/de-DE/images/all_features.png differ diff --git a/de-DE/images/text_grid.png b/de-DE/images/text_grid.png new file mode 100644 index 0000000..296dd1d Binary files /dev/null and b/de-DE/images/text_grid.png differ diff --git a/de-DE/meta.yml b/de-DE/meta.yml new file mode 100644 index 0000000..ff6404e --- /dev/null +++ b/de-DE/meta.yml @@ -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 diff --git a/de-DE/step_1.md b/de-DE/step_1.md new file mode 100644 index 0000000..5f00276 --- /dev/null +++ b/de-DE/step_1.md @@ -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) diff --git a/el-GR/images/all_features.png b/el-GR/images/all_features.png new file mode 100644 index 0000000..0b8b052 Binary files /dev/null and b/el-GR/images/all_features.png differ diff --git a/el-GR/images/text_grid.png b/el-GR/images/text_grid.png new file mode 100644 index 0000000..ebda7cb Binary files /dev/null and b/el-GR/images/text_grid.png differ diff --git a/el-GR/meta.yml b/el-GR/meta.yml new file mode 100644 index 0000000..2aee794 --- /dev/null +++ b/el-GR/meta.yml @@ -0,0 +1,11 @@ +--- +title: Δημιουργία κειμένου +hero_image: images/banner.png +description: Δημιουργία κειμένου +version: 4 +listed: false +copyedit: false +last_tested: "2021-09-27" +steps: + - + title: Δημιουργία κειμένου diff --git a/el-GR/step_1.md b/el-GR/step_1.md new file mode 100644 index 0000000..15d3083 --- /dev/null +++ b/el-GR/step_1.md @@ -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) diff --git a/en-US/images/all_features.png b/en-US/images/all_features.png new file mode 100644 index 0000000..dea63c9 Binary files /dev/null and b/en-US/images/all_features.png differ diff --git a/en-US/images/text_grid.png b/en-US/images/text_grid.png new file mode 100644 index 0000000..296dd1d Binary files /dev/null and b/en-US/images/text_grid.png differ diff --git a/en-US/meta.yml b/en-US/meta.yml new file mode 100644 index 0000000..ff6404e --- /dev/null +++ b/en-US/meta.yml @@ -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 diff --git a/en-US/step_1.md b/en-US/step_1.md new file mode 100644 index 0000000..5f00276 --- /dev/null +++ b/en-US/step_1.md @@ -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) diff --git a/es-419/images/all_features.png b/es-419/images/all_features.png new file mode 100644 index 0000000..6ece15b Binary files /dev/null and b/es-419/images/all_features.png differ diff --git a/es-419/images/text_grid.png b/es-419/images/text_grid.png new file mode 100644 index 0000000..634a2cc Binary files /dev/null and b/es-419/images/text_grid.png differ diff --git a/es-419/meta.yml b/es-419/meta.yml new file mode 100644 index 0000000..c5921ec --- /dev/null +++ b/es-419/meta.yml @@ -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 diff --git a/es-419/step_1.md b/es-419/step_1.md new file mode 100644 index 0000000..2c786b4 --- /dev/null +++ b/es-419/step_1.md @@ -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) diff --git a/fr-FR/images/all_features.png b/fr-FR/images/all_features.png new file mode 100644 index 0000000..f9019c9 Binary files /dev/null and b/fr-FR/images/all_features.png differ diff --git a/fr-FR/images/text_grid.png b/fr-FR/images/text_grid.png new file mode 100644 index 0000000..c377de8 Binary files /dev/null and b/fr-FR/images/text_grid.png differ diff --git a/fr-FR/meta.yml b/fr-FR/meta.yml new file mode 100644 index 0000000..485bcb2 --- /dev/null +++ b/fr-FR/meta.yml @@ -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 diff --git a/fr-FR/step_1.md b/fr-FR/step_1.md new file mode 100644 index 0000000..4caf427 --- /dev/null +++ b/fr-FR/step_1.md @@ -0,0 +1,51 @@ +Dessiner du texte en utilisant : `text('Texte à afficher', x, y)` + +Le texte sera dessiné en utilisant la valeur `fill` que tu as définie avant que `text` ne soit appelé. + +```python + +text('Ton texte', 250, 50) + +``` + +Le texte sera positionné aux coordonnées (x, y) données par les deux nombres. + +![« Ton texte » apparaît sur une grille avec la position (250, 50) marquée dans son coin inférieur gauche.](images/text_grid.png) + +Tu peux également ajuster le texte en utilisant : + +```python + +text_align(position_horizontale, position_verticale) + +``` + +Ce qui ajuste la position du texte à l'intérieur de la boîte invisible que tu crées aux coordonnées cibles. P5 inclut des variables spéciales pour chacune des positions que tu pourrais vouloir utiliser : + + - Une `position_horizontale` à `LEFT` alignera le texte à gauche de la zone de texte + - Une `position_horizontale` à `CENTER` centrera horizontalement le texte dans la zone de texte + - Une `position_horizontale` à `RIGHT` alignera le texte à droite de la zone de texte + - Une `position_verticale` à `TOP` alignera le texte en haut de la zone de texte + - Une `position_verticale` à `CENTER` alignera le texte au milieu de la zone de texte + - Une `position_verticale` à `BOTTOM` alignera le texte au bas de la zone de texte + +```python + +text_size(taille) + +``` + +Qui accepte un nombre en pixels qui représente la taille de police souhaitée. + +Par exemple, pour créer le mot « Bonjour », en texte rouge de 16 pixels de haut, centré sur un canevas 400, 400, tu utiliserais : + +```python + +fill(200, 0, 0) +text_size(16) +text_align(CENTER, CENTER) +text('Bonjour', 200, 200) + +``` + +![« Bonjour » apparaît en texte rouge, centré sur une grille marquée (200, 200).](images/all_features.png) diff --git a/hi-IN/images/all_features.png b/hi-IN/images/all_features.png new file mode 100644 index 0000000..dea63c9 Binary files /dev/null and b/hi-IN/images/all_features.png differ diff --git a/hi-IN/images/text_grid.png b/hi-IN/images/text_grid.png new file mode 100644 index 0000000..296dd1d Binary files /dev/null and b/hi-IN/images/text_grid.png differ diff --git a/hi-IN/meta.yml b/hi-IN/meta.yml new file mode 100644 index 0000000..ff6404e --- /dev/null +++ b/hi-IN/meta.yml @@ -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 diff --git a/hi-IN/step_1.md b/hi-IN/step_1.md new file mode 100644 index 0000000..5f00276 --- /dev/null +++ b/hi-IN/step_1.md @@ -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) diff --git a/it-IT/images/all_features.png b/it-IT/images/all_features.png new file mode 100644 index 0000000..0e322fb Binary files /dev/null and b/it-IT/images/all_features.png differ diff --git a/it-IT/images/text_grid.png b/it-IT/images/text_grid.png new file mode 100644 index 0000000..5c63cfb Binary files /dev/null and b/it-IT/images/text_grid.png differ diff --git a/it-IT/meta.yml b/it-IT/meta.yml new file mode 100644 index 0000000..b97e205 --- /dev/null +++ b/it-IT/meta.yml @@ -0,0 +1,11 @@ +--- +title: Crea testo +hero_image: images/banner.png +description: Crea testo +version: 4 +listed: false +copyedit: false +last_tested: "2021-09-27" +steps: + - + title: Crea testo diff --git a/it-IT/step_1.md b/it-IT/step_1.md new file mode 100644 index 0000000..4a9ffd4 --- /dev/null +++ b/it-IT/step_1.md @@ -0,0 +1,51 @@ +Disegna il testo utilizzando: `text('Testo da visualizzare', x, y)` + +Il testo verrà disegnato utilizzando il valore `fill` impostato prima che venga chiamato `text`. + +```python + +text('Il tuo testo', 250, 50) + +``` + +Il testo verrà posizionato alle coordinate (x, y) date dai due numeri. + +!['Il tuo testo' viene visualizzato su una griglia con la posizione (250, 50) contrassegnata nell'angolo in basso a sinistra.](images/text_grid.png) + +Puoi anche modificare il testo utilizzando: + +```python + +text_align(posizione_orizzontale, posizione_verticale) + +``` + +Che regola la posizione del testo all'interno della casella invisibile creata nelle coordinate di destinazione. P5 include variabili speciali per ciascuna posizione che potresti voler utilizzare: + + - Imposta `posizione_orizzontale` a `LEFT` per allineare il testo a sinistra della casella + - Imposta `posizione_orizzontale` a `CENTER` per allinearlo al centro della casella + - Imposta `posizione_orizzontale` a `RIGHT` per allinearlo a destra della casella + - Imposta `posizione_verticale` a `TOP` per allinearlo alla parte superiore della casella + - Imposta `posizione_verticale` a `CENTER` per allinearlo nel centro della casella di testo + - Imposta `posizione_verticale` a `BOTTOM` per allinearlo alla parte inferiore della casella + +```python + +text_size(dimensione) + +``` + +Che accetta un numero in pixel per impsotare la dimensione del carattere desiderata. + +Ad esempio, per creare la parola "Ciao", con testo rosso alto 16 pixel, centrato su una tela 400x400, dovresti scrivere: + +```python + +fill(200, 0, 0) +text_size(16) +text_align(CENTER, CENTER) +text('Ciao', 200, 200) + +``` + +!["Ciao" appare in testo rosso, centrato su una griglia contrassegnata (200, 200).](images/all_features.png) diff --git a/ja-JP/images/all_features.png b/ja-JP/images/all_features.png new file mode 100644 index 0000000..b80693c Binary files /dev/null and b/ja-JP/images/all_features.png differ diff --git a/ja-JP/images/text_grid.png b/ja-JP/images/text_grid.png new file mode 100644 index 0000000..3953e13 Binary files /dev/null and b/ja-JP/images/text_grid.png differ diff --git a/ja-JP/meta.yml b/ja-JP/meta.yml new file mode 100644 index 0000000..007bfb0 --- /dev/null +++ b/ja-JP/meta.yml @@ -0,0 +1,11 @@ +--- +title: テキストを作る +hero_image: images/banner.png +description: テキストを作る +version: 4 +listed: false +copyedit: false +last_tested: "2021-09-27" +steps: + - + title: テキストを作る diff --git a/ja-JP/step_1.md b/ja-JP/step_1.md new file mode 100644 index 0000000..14245b9 --- /dev/null +++ b/ja-JP/step_1.md @@ -0,0 +1,51 @@ +テキストを描くにはこれを使います: `text('表示するテキスト', x, y)` + +テキストは、 `text` が呼び出される前に設定した `fill` の値を使用して描かれます。 + +```python + +text('あなたのテキスト', 250, 50) + +``` + +テキストは、2つの数字で指定された(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` に `TOP` を使うと、テキストをテキストボックスの中央に寄せます + - `vertical_position` に `BOTTOM` を使うと、テキストをテキストボックスの下側に寄せます + +```python + +text_size(size) + +``` + +これは、希望のフォントサイズをピクセル単位で表した数値で指定するものです。 + +たとえば、400、400のキャンバスの中央に、高さ16ピクセルの赤いテキストで「こんにちは」という言葉を表示するには、次のようにします。 + +```python + +fill(200, 0, 0) +text_size(16) +text_align(CENTER, CENTER) +text('こんにちは', 200, 200) + +``` + +![「こんにちは」は、(200, 200) に配置されたグリッドの中央に赤いテキストで表示されます。](images/all_features.png) diff --git a/kn-IN/images/all_features.png b/kn-IN/images/all_features.png new file mode 100644 index 0000000..dea63c9 Binary files /dev/null and b/kn-IN/images/all_features.png differ diff --git a/kn-IN/images/text_grid.png b/kn-IN/images/text_grid.png new file mode 100644 index 0000000..296dd1d Binary files /dev/null and b/kn-IN/images/text_grid.png differ diff --git a/kn-IN/meta.yml b/kn-IN/meta.yml new file mode 100644 index 0000000..ff6404e --- /dev/null +++ b/kn-IN/meta.yml @@ -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 diff --git a/kn-IN/step_1.md b/kn-IN/step_1.md new file mode 100644 index 0000000..5f00276 --- /dev/null +++ b/kn-IN/step_1.md @@ -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) diff --git a/mr-IN/images/all_features.png b/mr-IN/images/all_features.png new file mode 100644 index 0000000..dea63c9 Binary files /dev/null and b/mr-IN/images/all_features.png differ diff --git a/mr-IN/images/text_grid.png b/mr-IN/images/text_grid.png new file mode 100644 index 0000000..296dd1d Binary files /dev/null and b/mr-IN/images/text_grid.png differ diff --git a/mr-IN/meta.yml b/mr-IN/meta.yml new file mode 100644 index 0000000..ff6404e --- /dev/null +++ b/mr-IN/meta.yml @@ -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 diff --git a/mr-IN/step_1.md b/mr-IN/step_1.md new file mode 100644 index 0000000..5f00276 --- /dev/null +++ b/mr-IN/step_1.md @@ -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) diff --git a/nl-NL/images/all_features.png b/nl-NL/images/all_features.png new file mode 100644 index 0000000..f89a9cc Binary files /dev/null and b/nl-NL/images/all_features.png differ diff --git a/nl-NL/images/text_grid.png b/nl-NL/images/text_grid.png new file mode 100644 index 0000000..7e8749e Binary files /dev/null and b/nl-NL/images/text_grid.png differ diff --git a/nl-NL/meta.yml b/nl-NL/meta.yml new file mode 100644 index 0000000..1c51c5d --- /dev/null +++ b/nl-NL/meta.yml @@ -0,0 +1,11 @@ +--- +title: Tekst maken +hero_image: images/banner.png +description: Tekst maken +version: 4 +listed: false +copyedit: false +last_tested: "2021-09-27" +steps: + - + title: Tekst maken diff --git a/nl-NL/step_1.md b/nl-NL/step_1.md new file mode 100644 index 0000000..41578e2 --- /dev/null +++ b/nl-NL/step_1.md @@ -0,0 +1,51 @@ +Maak tekst met: `text('Tekst om weer te geven', x, y)` + +De tekst wordt gemaakt met de `fill` waarde die je hebt ingesteld voordat `text` wordt aangeroepen. + +```python + +text('Jouw tekst', 250, 50) + +``` + +De tekst wordt gepositioneerd op de (x, y) coördinaten die door de twee getallen worden gegeven. + +!['Jouw tekst' verschijnt op een raster met de positie (250, 50) geplaatst in de linker benedenhoek.](images/text_grid.png) + +Je kunt de tekst ook aanpassen met: + +```python + +text_align(horizontale_positie, verticale_positie) + +``` + +Waarmee je de positie van de tekst aanpast binnen de onzichtbare rechthoek die je op de doelcoördinaten maakt. P5 bevat speciale variabelen voor elk van de posities die je mogelijk wilt gebruiken: + + - Een `horizontale_positie` van `LEFT` zal de tekst links in het tekstvak uitlijnen + - Een `horizontale_positie` van `CENTER` centreert de tekst horizontaal in het tekstvak + - Een `horizontale_positie` van `RIGHT` zal de tekst rechts in het tekstvak uitlijnen + - Een `verticale_positie` van `TOP` lijnt de tekst uit met de bovenkant van het tekstvak + - Een `verticale_positie` van `CENTER` zal de tekst uitlijnen in het midden van het tekstvak + - Een `verticale_positie` van `BOTTOM` lijnt de tekst uit met de onderkant van het tekstvak + +```python + +text_size(grootte) + +``` + +Hiermee stel je een getal in pixels in voor de gewenste lettergrootte. + +Als je bijvoorbeeld het woord "Hallo" wilt maken in rode tekst van 16 pixels hoog, gecentreerd op een 400, 400 canvas, gebruik je: + +```python + +fill(200, 0, 0) +text_size(16) +text_align(CENTER, CENTER) +text('Hallo', 200, 200) + +``` + +!['Hallo' verschijnt in rode tekst, gecentreerd op een raster gemarkeerd (200, 200).](images/all_features.png) diff --git a/pl-PL/images/all_features.png b/pl-PL/images/all_features.png new file mode 100644 index 0000000..d71c0a8 Binary files /dev/null and b/pl-PL/images/all_features.png differ diff --git a/pl-PL/images/text_grid.png b/pl-PL/images/text_grid.png new file mode 100644 index 0000000..1cbc405 Binary files /dev/null and b/pl-PL/images/text_grid.png differ diff --git a/pl-PL/meta.yml b/pl-PL/meta.yml new file mode 100644 index 0000000..6d60872 --- /dev/null +++ b/pl-PL/meta.yml @@ -0,0 +1,11 @@ +--- +title: Utwórz tekst +hero_image: images/banner.png +description: Utwórz tekst +version: 4 +listed: false +copyedit: false +last_tested: "2021-09-27" +steps: + - + title: Utwórz tekst diff --git a/pl-PL/step_1.md b/pl-PL/step_1.md new file mode 100644 index 0000000..1f95f2e --- /dev/null +++ b/pl-PL/step_1.md @@ -0,0 +1,51 @@ +Narysuj tekst używając: `text('Tekst do wyświetlenia', x, y)` + +Tekst zostanie narysowany przy użyciu wartości `wypełnienia` ustawionej przed wywołaniem `tekstu`. + +```python + +text('Twój tekst', 250, 50) + +``` + +Tekst zostanie umieszczony we współrzędnych (x, y) przez podanie dwóch liczb. + +!['Twój tekst' pojawia się na siatce z pozycją (250, 50) zaznaczoną w lewym dolnym rogu.](images/text_grid.png) + +Możesz również dostosować tekst, używając: + +```python + +text_align(polozenie_poziome, polozenie_pionowe) + +``` + +Który dostosowuje pozycję tekstu w niewidocznym polu, które tworzysz na docelowych współrzędnych. P5 zawiera specjalne zmienne dla każdej pozycji, której możesz chcieć użyć: + + - `polozenie_poziome` z `LEFT` spowoduje wyrównanie tekstu do lewej strony pola tekstowego + - `polozenie_poziome` z `CENTER` spowoduje wyśrodkowanie tekstu w polu tekstowym w poziomie + - `polozenie_poziome` z `RIGHT` spowoduje wyrównanie tekstu do prawej strony pola tekstowego + - `polozenie_pionowe` z `TOP` spowoduje wyrównanie tekstu do górnej części pola tekstowego + - `polozenie_pionowe` z `CENTER` spowoduje wyrównanie tekstu do środka pola tekstowego + - `polozenie_pionowe` z `BOTTOM` spowoduje wyrównanie tekstu do dołu pola tekstowego + +```python + +text_size(rozmiar) + +``` + +Który akceptuje liczbę w pikselach, która reprezentuje żądany rozmiar czcionki. + +Na przykład, aby utworzyć słowo „Hello” w czerwonym tekście o wysokości 16 pikseli, wyśrodkowane na płótnie 400, 400, użyjesz: + +```python + +fill(200, 0, 0) +text_size(16) +text_align(CENTER, CENTER) +text('Hello', 200, 200) + +``` + +!['Hello' pojawia się na czerwono, wyśrodkowany na siatce oznaczonej (200, 200).](images/all_features.png) diff --git a/pt-BR/images/all_features.png b/pt-BR/images/all_features.png new file mode 100644 index 0000000..30cef92 Binary files /dev/null and b/pt-BR/images/all_features.png differ diff --git a/pt-BR/images/text_grid.png b/pt-BR/images/text_grid.png new file mode 100644 index 0000000..2f4b510 Binary files /dev/null and b/pt-BR/images/text_grid.png differ diff --git a/pt-BR/meta.yml b/pt-BR/meta.yml new file mode 100644 index 0000000..234db5f --- /dev/null +++ b/pt-BR/meta.yml @@ -0,0 +1,11 @@ +--- +title: Criar texto +hero_image: images/banner.png +description: Criar texto +version: 4 +listed: false +copyedit: false +last_tested: "2021-09-27" +steps: + - + title: Criar texto diff --git a/pt-BR/step_1.md b/pt-BR/step_1.md new file mode 100644 index 0000000..fedc5ba --- /dev/null +++ b/pt-BR/step_1.md @@ -0,0 +1,51 @@ +Crie texto usando: `text('Texto a ser exibido', x, y)` + +O texto será criado usando o valor `fill` que você definiu antes do `text` ser chamado. + +```python + +text('Seu texto', 250, 50) + +``` + +O texto será posicionado nas coordenadas (x, y) dadas pelos dois números. + +!['Seu texto' aparece em uma grade com a posição (250, 50) marcada no canto inferior esquerdo.](images/text_grid.png) + +Você também pode ajustar o texto usando: + +```python + +text_align(posição_horizontal, posição_vertical) + +``` + +Que ajusta a posição do texto dentro da caixa invisível que você cria nas coordenadas escolhidas. P5 inclui variáveis especiais para cada uma das posições que você pode querer usar: + + - Uma `posição_horizontal` `LEFT` alinhará o texto à esquerda da caixa de texto + - Uma `posição_horizontal` `CENTER` alinhará o texto ao centro horizontal da caixa de texto + - Uma `posição_horizontal` `RIGHT` alinhará o texto à direita da caixa de texto + - Uma `posição_vertical` `TOP` alinhará o texto ao topo da caixa de texto + - Uma `posição_vertical` `CENTER` alinhará o texto no meio da caixa de texto + - Uma `posição_vertical` `BOTTOM` alinhará o texto à parte inferior da caixa de texto + +```python + +text_size(tamanho) + +``` + +Que aceita um número em pixels que representa o tamanho da fonte que você deseja. + +Por exemplo, para criar a palavra "Olá", em vermelho, com 16 pixels de altura e centralizado em uma tela de 400 x 400, você usaria: + +```python + +fill(200, 0, 0) +text_size(16) +text_align(CENTER, CENTER) +text('Olá', 200, 200) + +``` + +!['Olá' aparece em texto vermelho, centralizado em uma grade marcada (200, 200).](images/all_features.png) diff --git a/ru-RU/images/all_features.png b/ru-RU/images/all_features.png new file mode 100644 index 0000000..dea63c9 Binary files /dev/null and b/ru-RU/images/all_features.png differ diff --git a/ru-RU/images/text_grid.png b/ru-RU/images/text_grid.png new file mode 100644 index 0000000..296dd1d Binary files /dev/null and b/ru-RU/images/text_grid.png differ diff --git a/ru-RU/meta.yml b/ru-RU/meta.yml new file mode 100644 index 0000000..ff6404e --- /dev/null +++ b/ru-RU/meta.yml @@ -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 diff --git a/ru-RU/step_1.md b/ru-RU/step_1.md new file mode 100644 index 0000000..5f00276 --- /dev/null +++ b/ru-RU/step_1.md @@ -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) diff --git a/uk-UA/images/all_features.png b/uk-UA/images/all_features.png new file mode 100644 index 0000000..daf6d3d Binary files /dev/null and b/uk-UA/images/all_features.png differ diff --git a/uk-UA/images/text_grid.png b/uk-UA/images/text_grid.png new file mode 100644 index 0000000..d5d1598 Binary files /dev/null and b/uk-UA/images/text_grid.png differ diff --git a/uk-UA/meta.yml b/uk-UA/meta.yml new file mode 100644 index 0000000..123d9c7 --- /dev/null +++ b/uk-UA/meta.yml @@ -0,0 +1,11 @@ +--- +title: Створення тексту +hero_image: images/banner.png +description: Створення тексту +version: 4 +listed: false +copyedit: false +last_tested: "2021-09-27" +steps: + - + title: Створення тексту diff --git a/uk-UA/step_1.md b/uk-UA/step_1.md new file mode 100644 index 0000000..c82c45b --- /dev/null +++ b/uk-UA/step_1.md @@ -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 пікселів, розміщений по центру полотна розміром 400 на 400 пікселів: + +```python + +fill(200, 0, 0) +text_size(16) +text_align(CENTER, CENTER) +text('Привіт', 200, 200) + +``` + +!['Привіт' відображається червоним текстом та знаходиться по центру сітки з розміткою (200, 200).](images/all_features.png)