Advertisement
Guest User

Font Array Drawing for Cosmos!

a guest
Oct 11th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 23.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Cosmos.System.Graphics;
  6. using System.Drawing;
  7.  
  8. namespace togos
  9. {
  10.     public static class boomerfont
  11.     {
  12.         //Declare all the font uint[]
  13.  
  14.         public static uint[] a = new uint[8];
  15.         public static uint[] b = new uint[8];
  16.         public static uint[] c = new uint[8];
  17.         public static uint[] d = new uint[8];
  18.         public static uint[] e = new uint[8];
  19.         public static uint[] f = new uint[8];
  20.         public static uint[] g = new uint[8];
  21.         public static uint[] h = new uint[8];
  22.         public static uint[] i = new uint[8];
  23.         public static uint[] j = new uint[8];
  24.         public static uint[] k = new uint[8];
  25.         public static uint[] l = new uint[8];
  26.         public static uint[] m = new uint[8];
  27.         public static uint[] n = new uint[8];
  28.         public static uint[] o = new uint[8];
  29.         public static uint[] p = new uint[8];
  30.         public static uint[] q = new uint[8];
  31.         public static uint[] r = new uint[8];
  32.         public static uint[] s = new uint[8];
  33.         public static uint[] t = new uint[8];
  34.         public static uint[] u = new uint[8];
  35.         public static uint[] v = new uint[8];
  36.         public static uint[] w = new uint[8];
  37.         public static uint[] sx = new uint[8];
  38.         public static uint[] sy = new uint[8];
  39.         public static uint[] z = new uint[8];
  40.         public static uint[] n0 = new uint[8]; //remember the "n" before the number!
  41.         public static uint[] n1 = new uint[8];
  42.         public static uint[] n2 = new uint[8];
  43.         public static uint[] n3 = new uint[8];
  44.         public static uint[] n4 = new uint[8];
  45.         public static uint[] n5 = new uint[8];
  46.         public static uint[] n6 = new uint[8];
  47.         public static uint[] n7 = new uint[8];
  48.         public static uint[] n8 = new uint[8];
  49.         public static uint[] n9 = new uint[8];
  50.         public static uint[] colon = new uint[8];
  51.         public static uint[] semicolon = new uint[8];
  52.         public static uint[] slash = new uint[8];
  53.         public static uint[] quote = new uint[8]; //what are these called? btw Im not english.
  54.         public static uint[] backslash = new uint[8];
  55.         public static uint[] arrowright = new uint[8];
  56.         public static uint[] arrowleft = new uint[8];
  57.         public static uint[] space = new uint[8];
  58.         public static uint[] comma = new uint[8];
  59.         public static uint[] dot = new uint[8];
  60.         public static uint[] excla = new uint[8];
  61.         public static uint[] icon = new uint[10];
  62.         public static uint wx, wy;
  63.  
  64.  
  65.         public static void SetupFont()
  66.         {
  67.             #region load font
  68.             //Set all the font variables
  69.             a[0] = 2222222;
  70.             a[1] = 2222222;
  71.             a[2] = 2211222;
  72.             a[3] = 2122122;
  73.             a[4] = 2122122;
  74.             a[5] = 2122122;
  75.             a[6] = 2211212;
  76.             a[7] = 2222222;
  77.             a[8] = 2222222;
  78.             //a = new uint { 2222222, 2222222, 2211222, 2122122, 2122122, 2122122, 2211212, 2222222, 2222222 };
  79.  
  80.  
  81.  
  82.             b[0] = 2222222;
  83.             b[1] = 2122222;
  84.             b[2] = 2111222;
  85.             b[3] = 2122122;
  86.             b[4] = 2122122;
  87.             b[5] = 2122122;
  88.             b[6] = 2111222;
  89.             b[7] = 2222222;
  90.             b[8] = 2222222;
  91.  
  92.             c[0] = 2222222;
  93.             c[1] = 2222222;
  94.             c[2] = 2221122;
  95.             c[3] = 2212222;
  96.             c[4] = 2212222;
  97.             c[5] = 2212222;
  98.             c[6] = 2221122;
  99.             c[7] = 2222222;
  100.             c[8] = 2222222;
  101.  
  102.  
  103.             d[0] = 2222222;
  104.             d[1] = 2222122;
  105.             d[2] = 2211122;
  106.             d[3] = 2122122;
  107.             d[4] = 2122122;
  108.             d[5] = 2122122;
  109.             d[6] = 2211122;
  110.             d[7] = 2222222;
  111.             d[8] = 2222222;
  112.  
  113.  
  114.  
  115.             e[0] = 2222222;
  116.             e[1] = 2222222;
  117.             e[2] = 2211222;
  118.             e[3] = 2122122;
  119.             e[4] = 2111122;
  120.             e[5] = 2122222;
  121.             e[6] = 2211222;
  122.             e[7] = 2222222;
  123.             e[8] = 2222222;
  124.  
  125.  
  126.             f[0] = 2222222;
  127.             f[1] = 2221222;
  128.             f[2] = 2212222;
  129.             f[3] = 2211222;
  130.             f[4] = 2212222;
  131.             f[5] = 2212222;
  132.             f[6] = 2212222;
  133.             f[7] = 2222222;
  134.             f[8] = 2222222;
  135.  
  136.             g[0] = 2222222;
  137.             g[1] = 2211222;
  138.             g[2] = 2122122;
  139.             g[3] = 2122122;
  140.             g[4] = 2211122;
  141.             g[5] = 2222122;
  142.             g[6] = 2222122;
  143.             g[7] = 2122122;
  144.             g[8] = 2211222;
  145.  
  146.  
  147.             h[0] = 2222222;
  148.             h[1] = 2122222;
  149.             h[2] = 2122222;
  150.             h[3] = 2111222;
  151.             h[4] = 2122122;
  152.             h[5] = 2122122;
  153.             h[6] = 2122122;
  154.             h[7] = 2222222;
  155.             h[8] = 2222222;
  156.  
  157.             i[0] = 2222222;
  158.             i[1] = 2221222;
  159.             i[2] = 2222222;
  160.             i[3] = 2221222;
  161.             i[4] = 2221222;
  162.             i[5] = 2221222;
  163.             i[6] = 2221222;
  164.             i[7] = 2222222;
  165.             i[8] = 2222222;
  166.  
  167.  
  168.             j[0] = 2222222;
  169.             j[1] = 2222122;
  170.             j[2] = 2222222;
  171.             j[3] = 2222122;
  172.             j[4] = 2222122;
  173.             j[5] = 2222122;
  174.             j[6] = 2222122;
  175.             j[7] = 2122122;
  176.             j[8] = 2211222;
  177.  
  178.  
  179.  
  180.             k[0] = 2222222;
  181.             k[1] = 2212222;
  182.             k[2] = 2212222;
  183.             k[3] = 2212122;
  184.             k[4] = 2211222;
  185.             k[5] = 2212122;
  186.             k[6] = 2212122;
  187.             k[7] = 2222222;
  188.             k[8] = 2222222;
  189.  
  190.  
  191.             l[0] = 2222222;
  192.             l[1] = 2221222;
  193.             l[2] = 2221222;
  194.             l[3] = 2221222;
  195.             l[4] = 2221222;
  196.             l[5] = 2221222;
  197.             l[6] = 2221222;
  198.             l[7] = 2222222;
  199.             l[8] = 2222222;
  200.  
  201.  
  202.             m[0] = 2222222;
  203.             m[1] = 2222222;
  204.             m[2] = 2112122;
  205.             m[3] = 2121212;
  206.             m[4] = 2121212;
  207.             m[5] = 2121212;
  208.             m[6] = 2121212;
  209.             m[7] = 2222222;
  210.             m[8] = 2222222;
  211.  
  212.             n[0] = 2222222;
  213.             n[1] = 2222222;
  214.             n[2] = 2111222;
  215.             n[3] = 2122122;
  216.             n[4] = 2122122;
  217.             n[5] = 2122122;
  218.             n[6] = 2122122;
  219.             n[7] = 2222222;
  220.             n[8] = 2222222;
  221.  
  222.             o[0] = 2222222;
  223.             o[1] = 2222222;
  224.             o[2] = 2211222;
  225.             o[3] = 2122122;
  226.             o[4] = 2122122;
  227.             o[5] = 2122122;
  228.             o[6] = 2211222;
  229.             o[7] = 2222222;
  230.             o[8] = 2222222;
  231.  
  232.             p[0] = 2222222;
  233.             p[1] = 2222222;
  234.             p[2] = 2211222;
  235.             p[3] = 2122122;
  236.             p[4] = 2122122;
  237.             p[5] = 2122122;
  238.             p[6] = 2111222;
  239.             p[7] = 2122222;
  240.             p[8] = 2122222;
  241.  
  242.  
  243.             q[0] = 2222222;
  244.             q[1] = 2222222;
  245.             q[2] = 2211122;
  246.             q[3] = 2122122;
  247.             q[4] = 2122122;
  248.             q[5] = 2211122;
  249.             q[6] = 2222122;
  250.             q[7] = 2221112;
  251.             q[8] = 2222122;
  252.  
  253.             r[0] = 2222222;
  254.             r[1] = 2222222;
  255.             r[2] = 2212122;
  256.             r[3] = 2211222;
  257.             r[4] = 2212222;
  258.             r[5] = 2212222;
  259.             r[6] = 2212222;
  260.             r[7] = 2222222;
  261.             r[8] = 2222222;
  262.  
  263.             s[0] = 2222222;
  264.             s[1] = 2222222;
  265.             s[2] = 2211122;
  266.             s[3] = 2122222;
  267.             s[4] = 2211222;
  268.             s[5] = 2222122;
  269.             s[6] = 2111222;
  270.             s[7] = 2222222;
  271.             s[8] = 2222222;
  272.  
  273.             t[0] = 2222222;
  274.             t[1] = 2221222;
  275.             t[2] = 2221222;
  276.             t[3] = 2211122;
  277.             t[4] = 2221222;
  278.             t[5] = 2221222;
  279.             t[6] = 2221222;
  280.             t[7] = 2222222;
  281.             t[8] = 2222222;
  282.  
  283.             u[0] = 2222222;
  284.             u[1] = 2222222;
  285.             u[2] = 2122122;
  286.             u[3] = 2122122;
  287.             u[4] = 2122122;
  288.             u[5] = 2122122;
  289.             u[6] = 2211222;
  290.             u[7] = 2222222;
  291.             u[8] = 2222222;
  292.  
  293.             v[0] = 2222222;
  294.             v[1] = 2222222;
  295.             v[2] = 2212122;
  296.             v[3] = 2212122;
  297.             v[4] = 2212122;
  298.             v[5] = 2212122;
  299.             v[6] = 2221222;
  300.             v[7] = 2222222;
  301.             v[8] = 2222222;
  302.  
  303.  
  304.             w[0] = 2222222;
  305.             w[1] = 2222222;
  306.             w[2] = 2122212;
  307.             w[3] = 2122212;
  308.             w[4] = 2122212;
  309.             w[5] = 2121212;
  310.             w[6] = 2212122;
  311.             w[7] = 2222222;
  312.             w[8] = 2222222;
  313.  
  314.  
  315.             sx[0] = 2222222;
  316.             sx[1] = 2222222;
  317.             sx[2] = 2212122;
  318.             sx[3] = 2212122;
  319.             sx[4] = 2221222;
  320.             sx[5] = 2212122;
  321.             sx[6] = 2212122;
  322.             sx[7] = 2222222;
  323.             sx[8] = 2222222;
  324.  
  325.  
  326.             sy[0] = 2222222;
  327.             sy[1] = 2222222;
  328.             sy[2] = 2122122;
  329.             sy[3] = 2122122;
  330.             sy[4] = 2211122;
  331.             sy[5] = 2222122;
  332.             sy[6] = 2111222;
  333.             sy[7] = 2222222;
  334.             sy[8] = 2222222;
  335.  
  336.  
  337.             z[0] = 2222222;
  338.             z[1] = 2222222;
  339.             z[2] = 2111122;
  340.             z[3] = 2222122;
  341.             z[4] = 2211222;
  342.             z[5] = 2122222;
  343.             z[6] = 2111122;
  344.             z[7] = 2222222;
  345.             z[8] = 2222222;
  346.  
  347.  
  348.  
  349.             space[0] = 2222222;
  350.             space[1] = 2222222;
  351.             space[2] = 2222222;
  352.             space[3] = 2222222;
  353.             space[4] = 2222222;
  354.             space[5] = 2222222;
  355.             space[6] = 2222222;
  356.             space[7] = 2222222;
  357.             space[8] = 2222222;
  358.  
  359.  
  360.  
  361.             comma[0] = 2222222;
  362.             comma[1] = 2222222;
  363.             comma[2] = 2222222;
  364.             comma[3] = 2222222;
  365.             comma[4] = 2222222;
  366.             comma[5] = 2222222;
  367.             comma[6] = 2221222;
  368.             comma[7] = 2212222;
  369.             comma[8] = 2222222;
  370.  
  371.  
  372.             dot[0] = 2222222;
  373.             dot[1] = 2222222;
  374.             dot[2] = 2222222;
  375.             dot[3] = 2222222;
  376.             dot[4] = 2222222;
  377.             dot[5] = 2222222;
  378.             dot[6] = 2221222;
  379.             dot[7] = 2222222;
  380.             dot[8] = 2222222;
  381.  
  382.             excla[0] = 2222222;
  383.             excla[1] = 2221222;
  384.             excla[2] = 2221222;
  385.             excla[3] = 2221222;
  386.             excla[4] = 2221222;
  387.             excla[5] = 2222222;
  388.             excla[6] = 2221222;
  389.             excla[7] = 2222222;
  390.             excla[8] = 2222222;
  391.  
  392.             n0[0] = 2222222;
  393.             n0[1] = 2211122;
  394.             n0[2] = 2122212;
  395.             n0[3] = 2112212;
  396.             n0[4] = 2121212;
  397.             n0[5] = 2122112;
  398.             n0[6] = 2211122;
  399.             n0[7] = 2222222;
  400.             n0[8] = 2222222;
  401.  
  402.             n1[0] = 2222222;
  403.             n1[1] = 2221222;
  404.             n1[2] = 2211222;
  405.             n1[3] = 2221222;
  406.             n1[4] = 2221222;
  407.             n1[5] = 2221222;
  408.             n1[6] = 2211122;
  409.             n1[7] = 2222222;
  410.             n1[8] = 2222222;
  411.  
  412.             n2[0] = 2222222;
  413.             n2[1] = 2211122;
  414.             n2[2] = 2122212;
  415.             n2[3] = 2222122;
  416.             n2[4] = 2221222;
  417.             n2[5] = 2212222;
  418.             n2[6] = 2111112;
  419.             n2[7] = 2222222;
  420.             n2[8] = 2222222;
  421.  
  422.  
  423.             n3[0] = 2222222;
  424.             n3[1] = 2111222;
  425.             n3[2] = 2222122;
  426.             n3[3] = 2111222;
  427.             n3[4] = 2222122;
  428.             n3[5] = 2222122;
  429.             n3[6] = 2111222;
  430.             n3[7] = 2222222;
  431.             n3[8] = 2222222;
  432.  
  433.             n4[0] = 2222222;
  434.             n4[1] = 2121222;
  435.             n4[2] = 2121222;
  436.             n4[3] = 2121222;
  437.             n4[4] = 2111222;
  438.             n4[5] = 2221222;
  439.             n4[6] = 2221222;
  440.             n4[7] = 2222222;
  441.             n4[8] = 2222222;
  442.  
  443.  
  444.             n5[0] = 2222222;
  445.             n5[1] = 2111122;
  446.             n5[2] = 2122222;
  447.             n5[3] = 2122222;
  448.             n5[4] = 2111222;
  449.             n5[5] = 2222122;
  450.             n5[6] = 2111222;
  451.             n5[7] = 2222222;
  452.             n5[8] = 2222222;
  453.  
  454.             n6[0] = 2222222;
  455.             n6[1] = 2211222;
  456.             n6[2] = 2122122;
  457.             n6[3] = 2122222;
  458.             n6[4] = 2111222;
  459.             n6[5] = 2122122;
  460.             n6[6] = 2211222;
  461.             n6[7] = 2222222;
  462.             n6[8] = 2222222;
  463.  
  464.             n7[0] = 2222222;
  465.             n7[1] = 2111122;
  466.             n7[2] = 2222122;
  467.             n7[3] = 2221222;
  468.             n7[4] = 2212222;
  469.             n7[5] = 2212222;
  470.             n7[6] = 2212222;
  471.             n7[7] = 2222222;
  472.             n7[8] = 2222222;
  473.  
  474.  
  475.             n8[0] = 2222222;
  476.             n8[1] = 2211222;
  477.             n8[2] = 2122122;
  478.             n8[3] = 2211222;
  479.             n8[4] = 2122122;
  480.             n8[5] = 2122122;
  481.             n8[6] = 2211222;
  482.             n8[7] = 2222222;
  483.             n8[8] = 2222222;
  484.  
  485.             n9[0] = 2222222;
  486.             n9[1] = 2211222;
  487.             n9[2] = 2122122;
  488.             n9[3] = 2122122;
  489.             n9[4] = 2211122;
  490.             n9[5] = 2222122;
  491.             n9[6] = 2222122;
  492.             n9[7] = 2222222;
  493.             n9[8] = 2222222;
  494.  
  495.             slash[0] = 2222212;
  496.             slash[1] = 2222212;
  497.             slash[2] = 2222122;
  498.             slash[3] = 2222122;
  499.             slash[4] = 2221222;
  500.             slash[5] = 2212222;
  501.             slash[6] = 2212222;
  502.             slash[7] = 2122222;
  503.             slash[8] = 2122222;
  504.  
  505.  
  506.  
  507.             backslash[0] = 2122222;
  508.             backslash[1] = 2122222;
  509.             backslash[2] = 2212222;
  510.             backslash[3] = 2212222;
  511.             backslash[4] = 2221222;
  512.             backslash[5] = 2222122;
  513.             backslash[6] = 2222122;
  514.             backslash[7] = 2222212;
  515.             backslash[8] = 2222212;
  516.  
  517.  
  518.             arrowright[0] = 2222222;
  519.             arrowright[1] = 2222222;
  520.             arrowright[2] = 2212222;
  521.             arrowright[3] = 2221222;
  522.             arrowright[4] = 2222122;
  523.             arrowright[5] = 2221222;
  524.             arrowright[6] = 2212222;
  525.             arrowright[7] = 2222222;
  526.             arrowright[8] = 2222222;
  527.  
  528.             arrowleft[0] = 2222222;
  529.             arrowleft[1] = 2222222;
  530.             arrowleft[2] = 2222122;
  531.             arrowleft[3] = 2221222;
  532.             arrowleft[4] = 2212222;
  533.             arrowleft[5] = 2221222;
  534.             arrowleft[6] = 2222122;
  535.             arrowleft[7] = 2222222;
  536.             arrowleft[8] = 2222222;
  537.  
  538.  
  539.             colon[0] = 2222222;
  540.             colon[1] = 2222222;
  541.             colon[2] = 2222222;
  542.             colon[3] = 2221222;
  543.             colon[4] = 2222222;
  544.             colon[5] = 2222222;
  545.             colon[6] = 2221222;
  546.             colon[7] = 2222222;
  547.             colon[8] = 2222222;
  548.  
  549.             semicolon[0] = 2222222;
  550.             semicolon[1] = 2222222;
  551.             semicolon[2] = 2222222;
  552.             semicolon[3] = 2221222;
  553.             semicolon[4] = 2222222;
  554.             semicolon[5] = 2222222;
  555.             semicolon[6] = 2221222;
  556.             semicolon[7] = 2212222;
  557.             semicolon[8] = 2222222;
  558.  
  559.             quote[0] = 2212122;
  560.             quote[1] = 2212122;
  561.             quote[2] = 2222222;
  562.             quote[3] = 2222222;
  563.             quote[4] = 2222222;
  564.             quote[5] = 2222222;
  565.             quote[6] = 2222222;
  566.             quote[7] = 2222222;
  567.             quote[8] = 2222222;
  568.  
  569.             icon[0] = 2222211222;
  570.             icon[1] = 2222112222;
  571.             icon[2] = 2222122222;
  572.             icon[3] = 2211211222;
  573.             icon[4] = 2111111122;
  574.             icon[5] = 1111111112;
  575.             icon[6] = 1111111222;
  576.             icon[7] = 1111111222;
  577.             icon[8] = 1111111112;
  578.             icon[9] = 2111111122;
  579.             icon[10] = 2211211222;
  580.             #endregion
  581.         }
  582.  
  583.         public static void drawText(string text, uint x, uint y, Color color, Canvas screen)
  584.         {
  585.  
  586.             for (int count = 0; count <= text.Length; count++)
  587.             {
  588.                 drawLetter(text.Substring(count, 1), x, y, color, screen);
  589.                 x += 7;
  590.             }
  591.         }
  592.  
  593.         public static void drawLetter(string letter, uint x, uint y, Color color, Canvas screen)
  594.         {
  595.  
  596.             if (letter.Length != 1)
  597.             {
  598.                 CustomConsole.SendLogType("no letter defined", CustomConsole.MessageQuality.ERROR);
  599.             }
  600.             else
  601.             {
  602.                 //Do the magic
  603.                 switch (letter)
  604.                 {
  605.                     case " ":
  606.                         drawArray(space, x, y, color, screen);
  607.                         break;
  608.                     case "/":
  609.                         drawArray(slash, x, y, color, screen);
  610.                         break;
  611.                     case @"""":
  612.                         drawArray(quote, x, y, color, screen);
  613.                         break;
  614.                     case @"\":
  615.                         drawArray(backslash, x, y, color, screen);
  616.                         break;
  617.                     case ":":
  618.                         drawArray(colon, x, y, color, screen);
  619.                         break;
  620.                     case ";":
  621.                         drawArray(semicolon, x, y, color, screen);
  622.                         break;
  623.                     case ">":
  624.                         drawArray(arrowright, x, y, color, screen);
  625.                         break;
  626.                     case "<":
  627.                         drawArray(arrowleft, x, y, color, screen);
  628.                         break;
  629.                     case ",":
  630.                         drawArray(comma, x, y, color, screen);
  631.                         break;
  632.                     case ".":
  633.                         drawArray(dot, x, y, color, screen);
  634.                         break;
  635.                     case "!":
  636.                         drawArray(excla, x, y, color, screen);
  637.                         break;
  638.                     case "a":
  639.                         drawArray(a, x, y, color, screen);
  640.                         break;
  641.                     case "b":
  642.                         drawArray(b, x, y, color, screen);
  643.                         break;
  644.                     case "c":
  645.                         drawArray(c, x, y, color, screen);
  646.                         break;
  647.                     case "d":
  648.                         drawArray(d, x, y, color, screen);
  649.                         break;
  650.                     case "e":
  651.                         drawArray(e, x, y, color, screen);
  652.                         break;
  653.                     case "f":
  654.                         drawArray(f, x, y, color, screen);
  655.                         break;
  656.                     case "g":
  657.                         drawArray(g, x, y, color, screen);
  658.                         break;
  659.                     case "h":
  660.                         drawArray(h, x, y, color, screen);
  661.                         break;
  662.                     case "i":
  663.                         drawArray(i, x, y, color, screen);
  664.                         break;
  665.                     case "j":
  666.                         drawArray(j, x, y, color, screen);
  667.                         break;
  668.                     case "k":
  669.                         drawArray(k, x, y, color, screen);
  670.                         break;
  671.                     case "l":
  672.                         drawArray(l, x, y, color, screen);
  673.                         break;
  674.                     case "m":
  675.                         drawArray(m, x, y, color, screen);
  676.                         break;
  677.                     case "n":
  678.                         drawArray(n, x, y, color, screen);
  679.                         break;
  680.                     case "o":
  681.                         drawArray(o, x, y, color, screen);
  682.                         break;
  683.                     case "p":
  684.                         drawArray(p, x, y, color, screen);
  685.                         break;
  686.                     case "q":
  687.                         drawArray(q, x, y, color, screen);
  688.                         break;
  689.                     case "r":
  690.                         drawArray(r, x, y, color, screen);
  691.                         break;
  692.                     case "s":
  693.                         drawArray(s, x, y, color, screen);
  694.                         break;
  695.                     case "t":
  696.                         drawArray(t, x, y, color, screen);
  697.                         break;
  698.                     case "u":
  699.                         drawArray(u, x, y, color, screen);
  700.                         break;
  701.                     case "v":
  702.                         drawArray(v, x, y, color, screen);
  703.                         break;
  704.                     case "w":
  705.                         drawArray(w, x, y, color, screen);
  706.                         break;
  707.                     case "x":
  708.                         drawArray(sx, x, y, color, screen);
  709.                         break;
  710.                     case "y":
  711.                         drawArray(sy, x, y, color, screen);
  712.                         break;
  713.                     case "z":
  714.                         drawArray(z, x, y, color, screen);
  715.                         break;
  716.                     case "0":
  717.                         drawArray(n0, x, y, color, screen);
  718.                         break;
  719.                     case "1":
  720.                         drawArray(n1, x, y, color, screen);
  721.                         break;
  722.                     case "2":
  723.                         drawArray(n2, x, y, color, screen);
  724.                         break;
  725.                     case "3":
  726.                         drawArray(n3, x, y, color, screen);
  727.                         break;
  728.                     case "4":
  729.                         drawArray(n4, x, y, color, screen);
  730.                         break;
  731.                     case "5":
  732.                         drawArray(n5, x, y, color, screen);
  733.                         break;
  734.                     case "6":
  735.                         drawArray(n6, x, y, color, screen);
  736.                         break;
  737.                     case "7":
  738.                         drawArray(n7, x, y, color, screen);
  739.                         break;
  740.                     case "8":
  741.                         drawArray(n8, x, y, color, screen);
  742.                         break;
  743.                     case "9":
  744.                         drawArray(n9, x, y, color, screen);
  745.                         break;
  746.                 }
  747.             }
  748.         }
  749.         public static void drawLetter(string letter, ushort x, ushort y, Color color, Canvas screen)
  750.         {
  751.             drawLetter(letter, x, y, color, screen);
  752.         }
  753.  
  754.         public static void drawArray(uint[] letter, uint x, uint y, Color color, Canvas screen)
  755.         {
  756.             for (int i = 0; i <= letter.Length; i++) //This is the Y
  757.             {
  758.                 for (int j = 0; j <= letter.GetLength(0); j++) //This is X
  759.                 {
  760.                     if (letter[i].ToString().Substring(j, 1) == "1")
  761.                     {
  762.                         screen.DrawPoint(new Pen(color), x + j, y + i);
  763.                     }
  764.                     else if (letter[i].ToString().Substring(j, 1) == "2")
  765.                     {
  766.  
  767.                     }
  768.                     else
  769.                     {
  770.                         break;
  771.                     }
  772.  
  773.                 }
  774.  
  775.             }
  776.         }
  777.         public static void drawArray(uint[] letter, ushort x, ushort y, Color color, Canvas screen)
  778.         {
  779.             drawArray(letter, x, y, color, screen);
  780.         }
  781.     }
  782. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement