With the help of *saner* crazy tk xbm tingy (aka Tk XBM Editor), my colorfull tk version (I went to http://yahoo.com to look for a flag and found some interesting historical info...)
#!/usr/bin/perl -w use strict; use Tk 8; my $MWin = new Tk::MainWindow(-background => 'white', -width => 630 , -height => 400 , ,); my $CANVAS = $MWin->Canvas(-width => 612 , -height => 340 , -background => "white", -borderwidth => 0, -highlightthickness => 0, -selectborderwidth => 0, ,)->pack(-expand => 'no', -anchor => 'center', ,); &make_us_up_the_stripes($CANVAS); &draw_us_up_the_stars($CANVAS); &MainLoop(); sub draw_us_up_the_stars { my ($C) = shift; my $star = q'#define star_width 20 #define star_height 16 static unsigned char star_bits[] = { 0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x00,0x0f,0x00,0x00,0x0f +,0x00, 0xfc,0xff,0x03,0xf8,0xff,0x01,0xf0,0xff,0x00,0xe0,0x7f,0x00,0xc0,0x3f +,0x00, 0xc0,0x3f,0x00,0xe0,0x7f,0x00,0xe0,0x79,0x00,0xf0,0xf0,0x00,0x30,0xc0 +,0x00, 0x00,0x00,0x00};'; $star = $C->Bitmap(-background => '#000099', -foreground => 'white', -data => $star, ,); ## the #000099 thing $C->create("rectangle", 1, 1, 244, 183, -fill => "#000099", ); #define star_width 20 #define star_height 16 #6 + 5 * 20 = 220 | 244 #5 + 4 * 16 = 144 | 183 ## the even rows of stars (odd # of stars, even # rows) for my $x (0..5) #6 { for my $y (0..4) #5 { $C->create('image', 22 + $x * 40, 25 + $y * 16 *2, -image => $star, ,); } } ## the even rows of stars (odd # of stars, even # rows) for my $x (0..4) #5 { for my $y (0..3) #4 { $C->create('image', 40 + $x * 40, 40 + $y * 16 * 2, -image => $star, ,); } } } sub make_us_up_the_stripes { ## thar be 13 stripes, 7 red, and 6 white my ($CANVAS) = shift; for(0..12) { printf "%s\n", my $color = ( ($_ % 2) == 0 ) ? "red" : "white"; printf "%s\n", $CANVAS->create('rectangle', 1, ( $_ * 26+ 1), 609 , ( ( $_ * 26 ) + 26 + 1), -fill => $color, ,); } }
update: 9/24/2001 What, you want me to draw a star by hand???? Well I did and saved it as a Bitmap (the x-windows kind --- xbm).

 
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void

perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"


In reply to (crazyinsomniac: tk) Re: Stars & Stripes... by crazyinsomniac
in thread Stars & Stripes... by EvanK

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.