Hi there! This is a block that you can use to make costumes with text and it has great quality and many more features.
It's fast and reverts things as before
Doesn't take a lot of time. Prints the text and returns it. It also reverts things like before so you don't notice any changes. Just use very carefully to not interrupt the process of the block.
Supports almost all contexts
This block can manage data that the block of the library does not. Using invalid data will cause an error, and data that cannot be handled by the block correctly will be replaced with default values.
Gives the best quality and text with no cuts
Will depend of the size of the stage, but this block will try to clamp text to the stage if it's too big to prevent cuts. To use the highest quality use .
Source
Copy and Import:
<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="costume from text %'text' quality %'quality'" type="reporter" category="looks"><comment w="147" collapsed="false">Reports a costume with the text printed. Supports all contexts.

TIP: To use the highest quality, leave the quality number blank.</comment><header></header><code></code><translations></translations><inputs><input type="%s">Hello!</input><input type="%n">11</input></inputs><script><block s="doIf"><block s="reportEquals"><block s="reportGet"><l><option>self</option></l></block><block s="reportGet"><l><option>stage</option></l></block></block><script><block s="doDeclareVariables"><list><l>sprites</l></list></block><block s="doSetVar"><l>sprites</l><block s="reportGet"><l><option>other sprites</option></l></block></block><block s="doIfElse"><block s="reportEquals"><block s="reportListAttribute"><l><option>length</option></l><block var="sprites"/></block><l>0</l></block><script><block s="doApplyExtension"><l>err_error(msg)</l><list><l>expecting at least one sprite</l></list></block></script><script><block s="doReport"><block s="reportAskFor"><block s="reportListItem"><l><option>any</option></l><block var="sprites"/></block><block s="reifyReporter"><autolambda><custom-block s="costume from text %s quality %n"><block var="text"/><block var="quality"/></custom-block></autolambda><list></list></block><list></list></block></block></script></block></script><comment w="99" collapsed="false">If called on stage, will ask anothe sprite for the costume.</comment></block><block s="doIf"><block s="reportNot"><block s="reportOr"><block s="reportIsA"><block var="text"/><l><option>text</option></l></block><block s="reportIsA"><block var="text"/><l><option>number</option></l></block></block></block><script><block s="doApplyExtension"><l>err_error(msg)</l><list><l>can only get a costume of text or numbers, not a object</l></list></block></script><comment w="88" collapsed="false">Verifies if it's a text or numbers.</comment></block><block s="doDeclareVariables"><list><l>data</l><l>result</l></list></block><block s="doSetVar"><l>data</l><block s="reportNewList"><list><block s="xPosition"></block><block s="yPosition"></block><block s="direction"></block><block s="reportGet"><l><option>costume</option></l></block><block s="getEffect"><l><option>color</option></l></block><block s="getEffect"><l><option>saturation</option></l></block><block s="getEffect"><l><option>brightness</option></l></block><block s="getEffect"><l><option>ghost</option></l></block><block s="getEffect"><l><option>fisheye</option></l></block><block s="getEffect"><l><option>whirl</option></l></block><block s="getEffect"><l><option>pixelate</option></l></block><block s="getEffect"><l><option>mosaic</option></l></block><block s="getEffect"><l><option>negative</option></l></block><block s="getScale"></block><block s="getPenDown"></block><block s="getPenAttribute"><l><option>r-g-b-a</option></l></block><block s="reportPenTrailsAsCostume"></block><block var="text"/></list></block></block><block s="doIf"><block s="reportLessThan"><block s="reportStringSize"><block var="text"/></block><l>5</l></block><script><block s="doWarp"><script><block s="doRepeat"><block s="reportDifference"><l>5</l><block s="reportStringSize"><block var="text"/></block></block><script><block s="doSetVar"><l>text</l><block s="reportJoinWords"><list><block var="text"/><l> </l></list></block></block></script></block></script></block></script><comment w="130" collapsed="false">Put space after the text to give more height to the text.</comment></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="quality"/><l><option>number</option></l></block></block><script><block s="doSetVar"><l>quality</l><l>11</l></block></script><comment w="179.03515625" collapsed="false">If quality is not a number, then uses the default one.</comment></block><block s="doIf"><block s="reportOr"><block s="reportGreaterThan"><block var="quality"/><l>10000</l></block><block s="reportLessThanOrEquals"><block var="quality"/><l>0</l></block></block><script><block s="doSetVar"><l>quality</l><l>10000</l></block></script><comment w="121" collapsed="false">10000 is the highest quality possible on Snap!</comment></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block s="reportNewList"><list><l>80</l><l>80</l><l>80</l><l>255</l></list></block></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="setHeading"><l>90</l></block><block s="clearEffects"></block><block s="setScale"><l>100</l></block><block s="up"></block><block s="clear"><comment w="191" collapsed="false">Put the sprite information to a default one.</comment></block><block s="write"><block var="text"/><block var="quality"/></block><block s="doIf"><block s="reportGreaterThan"><block s="xPosition"></block><block s="reportAttributeOf"><l><option>right</option></l><l>Stage</l></block></block><script><block s="doDeclareVariables"><list><l>x delta</l><l>x pos</l></list></block><block s="doSetVar"><l>x delta</l><block s="reportProduct"><block s="xPosition"></block><l>-1</l></block></block><block s="doSetVar"><l>x pos</l><block s="reportDifference"><block s="xPosition"></block><block s="reportAttributeOf"><l><option>right</option></l><l>Stage</l></block></block></block><block s="write"><block var="text"/><l>1</l></block><block s="doChangeVar"><l>x delta</l><block s="xPosition"></block></block><block s="gotoXY"><block s="reportAttributeOf"><l><option>left</option></l><l>Stage</l></block><l>0</l></block><block s="clear"></block><block s="write"><block var="text"/><block s="reportDifference"><block var="quality"/><block s="reportQuotient"><block var="x pos"/><block var="x delta"/></block></block></block></script><comment w="177" collapsed="false">If the text is too big to put on the stage, it will clamp it to get the full text.</comment></block><block s="doSetVar"><l>result</l><block s="reportPenTrailsAsCostume"></block></block><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="result"/><block s="reportJoinWords"><list><block s="reportListItem"><l>18</l><block var="data"/></block><l></l></list></block></list><comment w="131" collapsed="false">Put the name of the costume as the text itself.</comment></block><block s="clear"></block><block s="gotoXY"><block s="reportListItem"><l>1</l><block var="data"/></block><block s="reportListItem"><l>2</l><block var="data"/></block></block><block s="doSwitchToCostume"><block s="reportListItem"><l>17</l><block var="data"/></block></block><block s="doStamp"><comment w="167.9873046875" collapsed="false">Reverts pen trails, but loses quality.</comment></block><block s="setPenColorDimension"><l><option>r-g-b(-a)</option></l><block s="reportListItem"><l>16</l><block var="data"/></block></block><block s="setEffect"><l><option>brightness</option></l><block s="reportListItem"><l>7</l><block var="data"/></block></block><block s="setEffect"><l><option>saturation</option></l><block s="reportListItem"><l>6</l><block var="data"/></block></block><block s="setEffect"><l><option>negative</option></l><block s="reportListItem"><l>13</l><block var="data"/></block></block><block s="setEffect"><l><option>pixelate</option></l><block s="reportListItem"><l>11</l><block var="data"/></block></block><block s="setEffect"><l><option>mosaic</option></l><block s="reportListItem"><l>12</l><block var="data"/></block></block><block s="setEffect"><l><option>fisheye</option></l><block s="reportListItem"><l>9</l><block var="data"/></block></block><block s="setEffect"><l><option>whirl</option></l><block s="reportListItem"><l>10</l><block var="data"/></block></block><block s="setEffect"><l><option>ghost</option></l><block s="reportListItem"><l>8</l><block var="data"/></block></block><block s="setEffect"><l><option>color</option></l><block s="reportListItem"><l>5</l><block var="data"/></block></block><block s="doSwitchToCostume"><block s="reportListItem"><l>4</l><block var="data"/></block></block><block s="setHeading"><block s="reportListItem"><l>3</l><block var="data"/></block></block><block s="setScale"><block s="reportListItem"><l>14</l><block var="data"/></block></block><block s="doIf"><block s="reportListItem"><l>15</l><block var="data"/></block><script><block s="down"></block></script></block><block s="doReport"><block var="result"/><comment w="131" collapsed="false">Reverts the sprite as before and reports the costume.</comment></block></script></block-definition></blocks>
(C) 2022 ScratchModification