Make the PPCG Favicon

21

5

Come November 1, Programming Puzzles and Code Golf will graduate, so in the next 11 months, we'll want to save some memories from when we were ungraduated.

Write a program that produces the PPCG favicon, seen below.

enter image description here

  • The image must be at least 64x64 pixels.
  • The blue must be the color #62B0DF. The background can be white or a light gray.
  • The image need not be pixelated like it is here.
  • Alternatively, create text (with dimensions at least 64x64 non-whitespace characters) using standard bright ANSI color codes of Cyan and White.
  • Built in images and importing the PPCG logo are not allowed.

This is code golf, so standard rules apply. Shortest code in bytes wins.

Arcturus

Posted 2015-11-25T15:06:27.810

Reputation: 6 537

10Seriously though, what do you mean by print? Output the bytes of this exact image? Display the image on the screen? Something else? – Dennis – 2015-11-25T15:12:14.570

3Without any restrictions on how the image can be displayed or generated, or any guidelines what kinds of answers should be considered interesting, this is by far too broad for a popularity contest. – Dennis – 2015-11-25T17:02:03.240

6@LegionMammal978 The [tag:popularity-contest] tag is not an excuse for a vague spec. The specification of a popularity contest should be held to the same standards as that of any other challenge type. The tag is intended for challenges where humans are better at judging the quality of an answers than computers (e.g. visual similarity in an image processing challenge), not for challenges where it's not even clear what a good answer would look like to a participant. "Most votes" does not constitute an objective winning criterion if there are no guidelines for how to aim for those votes. – Martin Ender – 2015-11-25T17:24:38.453

7I'd suggest to at least disallow loading the logo from any resource. – nicael – 2015-11-25T17:28:34.663

2@nicael that is already disallowed as a standard loophole. But as the poster said You heard the man, any way we like. The question is simply too broad. It might have stayed open 3 years ago before "Code Trolling" but not now. – Level River St – 2015-11-25T17:34:01.867

@steveverrill I added a rule saying that no future posters could load the image. – Arcturus – 2015-11-25T18:31:36.820

2"You can use whatever methods you want (except loading the image, with the exception of VoteToClose's response)" It isn't fair to allow exceptions for specific users/answers. – Alex A. – 2015-11-25T18:37:18.730

You can perhaps add the dimensions the output needs to be to make it more specific. Also you can specify by telling us what are the exact colours required for each part of the picture. – user41805 – 2015-11-25T19:43:00.463

8@Dennis He meant print it using the nearest cloud printer – Optimizer – 2015-11-25T22:38:17.050

Answers

18

Bash (OSX), 33 27 23 18 Bytes

You heard the man, any way we like.

open http:yon.se/q

I am aware that this is a popularity contest. But hey, when you can code golf it, why not?

It is now a code golf. \o/ This was valid at the time of posting.

There was even an exception made for me at some point! But, as @AlexA. pointed out...

"You can use whatever methods you want (except loading the image, with the exception of VoteToClose's response)" It isn't fair to allow exceptions for specific users/answers. - Alex A.

I agree with this, and, as of such, do not wish this to be picked as the answer. Doesn't mean I won't still try to golf it down more. ;)

Thanks to @ΚριτικσιΛίθος for shaving off 6 bytes with a fancy short URL!

Thanks to @ev3commander for shaving off ANOTHER 5 bytes with an even fancier, shorter URL!

Thanks to @kennytm for pointing out that I can reduce the protocol size and remove the quotes, saving me another 4 bytes!

Addison Crump

Posted 2015-11-25T15:06:27.810

Reputation: 10 763

Are you sure this has real chance to be the most popular? – manatwork – 2015-11-25T15:32:34.790

@manatwork It won't. This is mainly to point out why saying "anything else" might be a bit too vague. But I'll leave it up with hope. :D – Addison Crump – 2015-11-25T15:34:02.460

1@VoteToClose You can use this shorter URL to reduce byte count: http://goo.gl/gviJDX – user41805 – 2015-11-25T19:44:40.090

6@manatwork Reverse psychology? It's working. – George Reith – 2015-11-26T00:07:45.950

Can the protocol be left, or open doesn't work without? – Szabolcs Páll – 2015-11-27T16:06:34.587

@SzabolcsPáll If you remove the protocol, it'll assume file:///. – Addison Crump – 2015-11-27T16:10:36.480

Ah, makes sense. – Szabolcs Páll – 2015-11-27T16:11:23.000

1Even shorter: open http:goo.gl/gviJDX – kennytm – 2015-11-28T04:46:13.893

@kennytm Huh, didn't know that bash did that. :D – Addison Crump – 2015-11-28T13:48:25.290

5try this url: http:yon.se/q – ev3commander – 2015-11-28T23:32:33.880

That's 18 bytes... – ev3commander – 2015-11-29T22:19:47.760

1@ev3commander You're right - just forgot to update it, thanks. – Addison Crump – 2015-11-29T22:58:24.720

6Link is borked. – Rɪᴋᴇʀ – 2016-04-07T23:31:39.047

12

BitShift, 2795 bytes

10100110010101101001010111001010110100101011100101011010010101110010101101001010111001010110100101011100101011010010101110010101101001010111001010110100101011100101011010010101110010101101111011101010000000110101001011010100011010100010101101010010101101010010101101010010101101010010101101010010101101010011010100101101010001101010010110101001100110010101111111001010111010100101011010100101011010100101011010100101011010100101011010100101011010100101011010100101011001010110100101011001100110101000000011010100010101101010010101101010010101101010010101101010010101101010010101101010010101101010010101101010011010100101101010011001100101011111110010101110101001010110101001010110101001010110101001010110101001010110101001010110101001010110101001010110010101101001010110011001101010000000110101000101011001010110100101011100101011101010010101101010011010100101101010001010110101001010110010101101001010111001010111010100110101001011010100110011001010111111100101011101010011010100010101101010011010100010101100101011101010010101100101011101010011010100010101101010010101101010011010100101101010011001100101011111110010101110101001101010010110101000110101000101011010100110101000101011010100101011010100110101000101011001010110100101011101010011010100101101010011001100101011111110010101110101001101010001010110101001010110101001101010001010110101001101010001010110010101110101001010110010101110101001101010010110101001100110010101111111001010111010100110101000101011010100101011010100101011001010110100101011101010010101101010011010100101101010001010110101001101010010110101001100110010101111111001010111010100101011010100101011010100101011010100101011010100101011010100101011010100101011010100101011001010110100101011001100110101000000011010100101101010001010110101001010110101001010110101001010110101001010110101001010110101001010110101001101010010110101000110101001000010001010111111100101011010010101110010101110101001010110101001010110101001010110101001010110101001010110101001010110010101101001010111001010110100101011001100110101000000011010100101101010001101010010110101000110101001011010100011010100101101010001101010001010110101001010110010101101001010111001010110100101011100101011010010101110010101101111011101010000000110101001011010100011010100101101010001101010010110101000110101001011010100011010100010101101010011010100101101010001101010010110101000110101001011010100011010100101101010011001100101011111110010101101001010111001010110100101011100101011010010101110010101101001010111001010111010100110101001011010100011010100101101010001101010010110101000110101001011010100011010100100001000101011111110010101101001010111001010110100101011100101011010010101110010101101001010111001010110100101011100101011010010101110010101101001010111001010110100101011100101011010010101110010101

This outputs

   @@@@@@@@@@@@    
 @@@@@@@@@@@@@@@@  
 @@@@@@@@@@@@@@@@  
 @@@@@@@@@@@@@@@@  
 @   @@@  @@@   @  
 @ @@ @ @@ @ @@@@  
 @   @@ @@@@ @  @  
 @ @@@@ @@ @ @@ @  
 @ @@@@@  @@@  @@  
 @@@@@@@@@@@@@@@@  
  @@@@@@@@@@@@@@   
   @@@@@@@@@@@@    
         @@@       
         @@        
         @         

  This is probably the shortest code with which you can actually still recognize the logo... I created a terrible language :(

Try it here

Note
This was submitted before the rules were changed, by the current rules this answer is invalid. I will leave it here to perhaps inspire people

Bassdrop Cumberwubwubwub

Posted 2015-11-25T15:06:27.810

Reputation: 5 707

5Now now, don't be sad, that is some very special output from a very special language. – Sven Writes Code – 2015-11-25T19:33:08.197

12

JavaScript

Note: This answer was made before the rules were significantly changed so this answer is not competing.


This prints in into the your browser console, through some crazy and awesome string processing.

I've made a shorter version of this but I can't seem to find it anywhere.

Chrome/Firefox

This version just doubles up on each pixel so it looks more proportional

var a = `<long_string_here>`;
console.log.apply(console, [].concat.apply( [Array(+a.split('\n')[1].split(' ')[1] ).join(' ').split(' ').map(function(l){return'%c█'.repeat(+a.split('\n')[1].split(' ')[0]).repeat(2)}).join('\n')], a.split`
`.slice(3).map(function(l){return [].concat.apply([], l.match(/\d+ \d+ \d+/g).map(function(l){return [l.replace(/(\d+) (\d+) (\d+)/,"color:rgb($1,$2,$3)"),l.replace(/(\d+) (\d+) (\d+)/,"color:rgb($1,$2,$3)")]}))})))

Safari

var a = `<long_string_here>`;
console.log.apply(console, [].concat.apply( [Array(+a.split('\n')[1].split(' ')[1] ).join(' ').split(' ').map(function(l){return'%c█'.repeat(+a.split('\n')[1].split(' ')[0])}).join('\n')], a.split`
`.slice(3).map(function(l){return l.match(/\d+ \d+ \d+/g).map(function(l){return l.replace(/(\d+) (\d+) (\d+)/,"color:rgb($1,$2,$3)")})})))

The long_string_here is an ppm, I wrote this script a while back to print an arbitrary image to the console.


How does this work? Well JavaScript has a feature in console.log where you can provide css to style the message.

I the unicode character and color that the correct color, which is retrieved from the ppm.


To display any other image run: convert my_img.png -resize 50x50 -trim -compress none -blur 1x2 -flatten -background white ppm:-, then copy the output to <long_string_here>

Full code

Because this is quite massive, I've put the full code in pastebins so you can run them

Chrome/Firefox: pastebin

Safari: pastebin


Result

enter image description here

Firefox Result

Safari Result

Downgoat

Posted 2015-11-25T15:06:27.810

Reputation: 27 116

4Can you downsize the screenshots a bit? Every single one of them takes up all of my vertical screen estate. (Maybe one image is sufficient, make the rest links). – mınxomaτ – 2015-11-27T07:27:45.923

What's the byte count? this is [tag:code-golf] now – cat – 2015-11-27T15:57:38.320

11

Ruby with Shoes

zoom = 10

Shoes.app(width: 19 * zoom, height: 18 * zoom) {
    background white

    stroke fill '#62B0DF'
    rect 1 * zoom, 1 * zoom, 17 * zoom, 13 * zoom, 3 * zoom

    skew 0, -45
    rect 10 * zoom, 11 * zoom, 5 * zoom, 4 * zoom

    stack(left: 1 * zoom, top: 3 * zoom) {
        para('PCG').style size: (5.66 * zoom).to_i, weight: 700, stroke: white
    }

}

Sample output:

PPCG logo drawn with Shoes

manatwork

Posted 2015-11-25T15:06:27.810

Reputation: 17 865

10

Javascript (ES2015), 199 bytes

(+72 bytes of CSS)

My code prints the logo into the <body> element of a page through some unicode sequences. Suggestions improving the code are welcome (especially for 0-pads task)

Demo (tested on MacOsX/Chrome 46): http://codepen.io/anon/pen/EVBmKN?editors=011


Javascript (newlines inserted for readability)

f=l=>{for(l of[49155,0,0,0,29070,19024,29206,16978,16780,0,0,32769,49155,65311,
65343,65407].map(r=>(1e15+r.toString(2)).slice(-16)))document.body.innerText+=
[...l].map(b=>["▉", " "][b]).join``+"\n"}

CSS

*{letter-spacing:-.1em;font:1em/.96 arial;white-space:pre;color:#62B0DF}

Result

PCG Logo


Ungolfed and Explained

If we consider the original 16x16 PCG icon originally posted, we could encode the information in a binary format.

E.g. the first line would be encoded as 1100 0000 0000 0011 where [0, 1] maps to [blue, white]. Every binary number can be easily stored in decimal format so 1100 0000 0000 0011 is 49155. The array

[49155,0,0,0,29070,19024,29206,16978,16780,0,0,32769,49155,65311,65343,65407]

contains all the information (in decimal format) about each pixel color. Each element of the array represents a line to draw. Note that some lines are 0 (full-blue lines) or their length is less than 16 digits (a line starting with a blue pixel): then we need to right-pad these binary numbers

[...].map(r=>(1e15+r.toString(2)).slice(-16))

The map function add 15 zeroes to the left plus the binary number concatenated. Thus the result is sliced by 16 pixel to the left. Now the array is actually

0:  "1100000000000011"
1:  "0000000000000000"
2:  "0000000000000000"
3:  "0000000000000000"
4:  "0111000110001110"
5:  "0100101001010000"
6:  "0111001000010110"
7:  "0100001001010010"
8:  "0100000110001100"
9:  "0000000000000000"
10: "0000000000000000"
11: "1000000000000001"
12: "1100000000000011"
13: "1111111100011111"
14: "1111111100111111"
15: "1111111101111111"

Take a look closer at the digits above: we can almost see the PCG logo. :)
Note that if we store this information in the array, we need to use 16x18 bytes (288 bytes). This approach requires instead 135 bytes

The next step is draw each line. The construct

for(l of [...].map(...))

loop over the array values (ES6 feature) and we add to the body

document.body.innerText += [...l]

where [...l] represent the binary string as an array . E.g. the first line would be read as

["1", "1", "0", "0" ... , "0", "0", "1", "1"]

then again we use map() to transform each value:

 b=>["▉", " "][b]

if the value is 0 then it becomes a LEFT SEVEN EIGHTHS BLOCK (U+2589) otherwise it is a space EM SPACE (U+2003). In short this assignment

document.body.innerText += [...l].map(b=>["▉", " "][b]).join``+"\n"

converts each 0 or 1 either into a squared block or into a space: then the array is joined and, along with a trailing newline sequence, is appended to the body.

The CSS I've used fixes the line-height and the letter-spacing (I've tested on Chrome, so the result may slightly vary in other browsers)

Fabrizio Calderan

Posted 2015-11-25T15:06:27.810

Reputation: 470

3control-f 0, and you CAN see the PPCG logo in the 0s and 1s :D – ev3commander – 2015-11-29T00:04:32.673

@ev3commander When I control-f, then it starts lagging, due to the BitShift answer. – Comrade SparklePony – 2017-03-21T20:05:32.203

7

Brainfuck, 120148 bytes

This answer is now non-competitive. This was before the rules were changed, and this has absolutely no hope of winning as code-golf.

Brainfuck code to output hex value of image. Very, very, long.

Here is a pastebin link, and the first couple lines. https://paste.ee/p/LtcCy

+[--------->+<]>-.+.----.-----.++++.-[--->++++<]>+.>-[----->+<]>+.+++.-------.--[-->+++<]>-.+[--->++<]>++.[--->++++<]>+.-[---->+++<]>+.-[--->++++<]>+.-[---->+++<]>.[--->++++<]>+.-[---->+++<]>.......--[-->+++<]>-.[---->+++<]>+.+++++.-----.++++.----..+.---.--......+.++.---......+.+.--.++++++++.--------.++++++.------......----[-->+++<]>.---------.---------.--[-->+++<]>--.++.-[------>+<]>-.+.+++.---------....+.+++++++.------.+++.+.+++.-----.-.+.-.++.-----.++++.+++++.-----.-.+.-.-.--.+++++.-----.+++++++.-----.++++.[->++++++<]>++.--[------>+<]>...+++.-- 

Rɪᴋᴇʀ

Posted 2015-11-25T15:06:27.810

Reputation: 7 410

+1 for the solid byte count, reads very well! Just a note: pasted it there, looks like 120,148 bytes.

– nicael – 2015-11-27T20:09:40.763

Thanks, I put in through that exact same counter. I must have mistyped or something. Fixed now. – Rɪᴋᴇʀ – 2015-11-28T23:01:17.250

6

Javascript ES6, 461 bytes

I need to work on the compression more.

x.style.cssText='display:block;font:4px/2px monospace;color:#62B0DF',x.innerHTML=`  28
 38
 31
${a=`5
`.repeat(8)}6   a   a    7
6  8  8 8  8  8  6
6  8  +  7  71
6      +9 6
6  a9 6
6  6a 8  1 6
698   +  6
6  7+   1+    7
${a} 31
 38
  3+
   28
47
46
41+
41
48
4+`[r='replace'](/a/g,'  1')[r](/9/g,'  7  +  ')[r](/8/g,'++')[r](/7/g,11)[r](/6/g,'1++')[r](/5/g,'31+')[r](/4/g,Array(18).join` `)[r](/3/g,21)[r](/2/g,11111111)[r](/1/g,'+++')
<pre id=x></pre>

Mama Fun Roll

Posted 2015-11-25T15:06:27.810

Reputation: 7 234

6

Snap, 16 blocks

enter image description here
Tell me if this is invalid.

ev3commander

Posted 2015-11-25T15:06:27.810

Reputation: 1 187

Probably invalid... but who cares; it looks good enough. – wizzwizz4 – 2017-12-15T18:29:57.643

5

Bubblegum, 175 bytes

One of the rare times Bubblegum is useful for !

Run in a terminal that supports ANSI escape codes.

0000000: e060 3e00 a75d 000d 97c4 b1da c813 35e1  .`>..]........5.
0000010: 9ebb 75d8 b95a ea28 a23d e9c6 5d80 7ce0  ..u..Z.(.=..].|.
0000020: 8d72 884f 2eb0 23f0 a6dc 406b 5724 9b78  .r.O..#...@kW$.x
0000030: 229d 11b7 29c8 9be6 7b76 26d4 f41a 69e0  "...)...{v&...i.
0000040: e626 1923 061a 07fc 4ca6 3cc9 f947 7760  .&.#....L.<..Gw`
0000050: 86df 1d86 37a8 6825 dd9d a3b4 a050 573c  ....7.h%.....PW<
0000060: 7efa 920a 446d 98f8 eeb9 91f7 f912 ca3b  ~...Dm.........;
0000070: 9360 ddba 3450 30ff cee0 fb32 31d1 06cd  .`..4P0....21...
0000080: 0d46 2f2d 5371 896c 6bb0 5fb8 3d6d f096  .F/-Sq.lk._.=m..
0000090: 67e9 8cb8 f92f 9eaa 7d35 0914 a742 6315  g..../..}5...Bc.
00000a0: 1a62 f54d b969 b980 c832 8a3f 8c00 00    .b.M.i...2.?...

Reverse the hexdump with xxd -r

Here's a screenshot of output:

Screenshot of program output

Note: On my Windows machine with the MinGW terminal, the Windows Python binary doesn't output ANSI codes correctly so the above was python <esolangs reference implementation>.py <infile> | cat but it should work correctly on Linux machines.

DankMemes

Posted 2015-11-25T15:06:27.810

Reputation: 2 769

4

LibreLogo, 122 116 115 bytes

Using Logo to create a Logo. Does this count as recursion?

Code:

fontsize 20 fontcolor [3]fontweight "bold pc [24]fc 6402271 bk 40 rt 45 fd 40 fill home rectangle[64,52,5]text "PCG

Result:

enter image description here

Explanation:

fontsize 20             ; Font Size   = 20pt
fontcolor [3]           ; Font Color  = white
fontweight "bold        ; Font Weight = bold
pc [24]                 ; Pen Color   = invisible
fc 6402271              ; Fill Color  = #61B0DF
bk 40                   ; Move Back 40pt
rt 45                   ; Turn Clockwise 45 Degrees
fd 40                   ; Move Forward 40pt
fill                    ; Close and Fill the Line Shape
home                    ; Reset Initial Turtle Settings and Position
rectangle[64,52,5]      ; Draw a Rectangle with Rounded Corners
text "PCG               ; Set Text of the Actual Drawing Object as "PCG"

Previous Attempts:

116 Bytes:

fontsize 20 fontcolor [3]fontweight "bold pc [24]fc 0x61b0df bk 40 rt 45 fd 40 fill home rectangle[64,52,5]text "PCG

122 Bytes:

ht fontsize 20 fontcolor [3]fontweight "bold pc [24]fc [97,176,223]bk 40 rt 45 fd 40 fill home rectangle[64,52,5]text "PCG

Grant Miller

Posted 2015-11-25T15:06:27.810

Reputation: 706

4

Javascript (ES6), 192 bytes

document.body.innerHTML='<svg><path fill=#62B0DF d="'+"m01Q0010L60Q7071L74Q7565L55L37L35L15Q0504z".split('').map(v=>v*20||v).join(" ")+'"/><text y=65 fill=#FFF style="font:38pt arial">\xa0PCG'

This takes a compressed version of a SVG D path. Spaces are removed, so all arguments have to be a single decimal, so any number is multiplied by 20 before being written to the actual svg.

Output:
enter image description here
Demo: https://jsfiddle.net/Luy6qj80/

Abex

Posted 2015-11-25T15:06:27.810

Reputation: 151

@RikerW It doesn't look to be taking from a URL. – Conor O'Brien – 2016-03-09T03:21:14.810

NVM, I realized what this does. Nice job. – Rɪᴋᴇʀ – 2016-03-09T03:42:35.147

3

JavaScript, 680 bytes

Well, I had this already finished for the original contest, which rules were changed drastically. This is definitely not the shortest code you can come up with. It was designed for the popularity contest and it creates the original favicon pixel by pixel. It has some more features, too. :)

f=c=>{x=(d=document).body.appendChild(d.createElement`canvas`).getContext`2d`;if(c.b)x.scale(4,4);x.fillStyle=c.m?'#2d2d2d':'#62b0df';x.fillRect(0,0,16,16);x.fillStyle='#fff';for(i=0;i<(w=[0,0,1,0,14,0,15,0,0,11,15,11,0,12,1,12,14,12,15,12,0,13,1,13,2,13,3,13,4,13,5,13,6,13,7,13,11,13,12,13,13,13,14,13,15,13,0,14,1,14,2,14,3,14,4,14,5,14,6,14,7,14,10,14,11,14,12,14,13,14,14,14,15,14,0,15,1,15,2,15,3,15,4,15,5,15,6,15,7,15,9,15,10,15,11,15,12,15,13,15,14,15,15,15,1,4,2,4,3,4,7,4,8,4,12,4,13,4,14,4,1,5,4,5,6,5,9,5,11,5,1,6,2,6,3,6,6,6,11,6,13,6,14,6,1,7,6,7,9,7,11,7,14,7,1,8,7,8,8,8,12,8,13,8,]).length;i++)(t=a=>setTimeout(_=>x.fillRect(w[a++],w[a++],1,1),(c.a||0)*i))(i++)}

You can call the function with up to three parameters:

f({});
f({m:true});
f({b:true});
f({a:50});
f({m:true,b:true,a:50});

m goes meta and changes the color accordingly. And if you find it to small, use b to supersize it from 16x16px to 64x64px. Finally a animates the logo, like it is engraved into a blue board. The value is the speed for each animation step.

Ungolfed

f=c=>{
    x=(d=document).body.appendChild(d.createElement`canvas`).getContext`2d`;
    if (c.b) x.scale(4,4);
    x.fillStyle = c.m?'#2d2d2d':'#62b0df';
    x.fillRect(0,0,16,16);
    x.fillStyle='#fff';
    for(i=0;i<(w=[0,0,1,0,14,0,15,0,0,11,15,11,0,12,1,12,14,12,15,12,0,13,1,13,2,13,3,13,4,13,5,13,6,13,7,13,11,13,12,13,13,13,14,13,15,13,0,14,1,14,2,14,3,14,4,14,5,14,6,14,7,14,10,14,11,14,12,14,13,14,14,14,15,14,0,15,1,15,2,15,3,15,4,15,5,15,6,15,7,15,9,15,10,15,11,15,12,15,13,15,14,15,15,15,1,4,2,4,3,4,7,4,8,4,12,4,13,4,14,4,1,5,4,5,6,5,9,5,11,5,1,6,2,6,3,6,6,6,11,6,13,6,14,6,1,7,6,7,9,7,11,7,14,7,1,8,7,8,8,8,12,8,13,8,]).length;i++)
        (t=a=>setTimeout(_=>x.fillRect(w[a++],w[a++],1,1),(c.a||0)*i)
        )(i++);       
}

Output

Default

PPCG Favicon reproduction

Animated

PPCG Favicon reproduction animated

insertusernamehere

Posted 2015-11-25T15:06:27.810

Reputation: 4 551

Six hundreds and eighty bytes?! You want to make your answer leaderboard-bot proof? – RedClover – 2017-09-28T13:38:44.017

2

05AB1E, 49 bytes

•(!o4¯ZD5µå¹p‹^Ô%í2\AO-Ö"w™ÈõžvlXäà`AF•bT„.@‡19ô»

Try it online!

...@@@@@@@@@@@@....
.@@@@@@@@@@@@@@@@..
.@@@@@@@@@@@@@@@@..
.@@@@@@@@@@@@@@@@..
.@...@@@..@@@...@..
.@.@@.@.@@.@.@@@@..
.@...@@.@@@@.@..@..
.@.@@@@.@@.@.@@.@..
.@.@@@@@..@@@..@@..
.@@@@@@@@@@@@@@@@..
..@@@@@@@@@@@@@@...
...@@@@@@@@@@@@....
.........@@@.......
.........@@........
.........@.........

Magic Octopus Urn

Posted 2015-11-25T15:06:27.810

Reputation: 19 422

2Hm. Assuming that ASCII characters are standing in for pixels here, this isn't "at least 64x64 pixels." – DLosc – 2017-03-22T05:20:31.037

2

Excel VBA, 252 246 245 237 Bytes

Saved 6 bytes thanks to Taylor Scott.
Saved another 8 bytes thanks to inspiration from Taylor Scott

Sub p()
Set s=Shapes.AddShape(106,0,0,99,82)
With s.TextEffect
.Text="PCG
.FontSize=56
.Alignment=2
End With
s.TextFrame2.WordWrap=0
s.Adjustments.Item(1)=.1
s.Adjustments.Item(2)=.9
s.Line.Visible=0
s.Fill.ForeColor.RGB=14659682
End Sub

The code must be run from a worksheet's code page and will add the shape to that worksheet. It's nothing fancy but it does directly use the rounded rectangular callout upon which the icon is based. (For AddShape, 106 corresponds to msoShapeRoundedRectangularCallout.)

Icon

Formatting doesn't add much but it does make it easier to read:

Sub p()
    Set s = Shapes.AddShape(106, 0, 0, 99, 82)
    With s.TextEffect
        .Text = "PCG"
        .FontSize = 56
        .Alignment = 2
    End With
    s.TextFrame2.WordWrap = 0
    s.Adjustments.Item(1) = 0.1
    s.Adjustments.Item(2) = 0.9
    s.Line.Visible = 0
    s.Fill.ForeColor.RGB = 14659682
End Sub

There's also a one-line solution meant to be run in the immediate window that is 1 byte longer:

Set s=Sheet1.Shapes.AddShape(106,0,0,99,82):s.TextEffect.Text="PCG":s.TextEffect.FontSize=56:s.TextEffect.Alignment=2:s.TextFrame2.WordWrap=0:s.Adjustments.Item(1)=.1:s.Adjustments.Item(2)=.9:s.Line.Visible=0:s.Fill.ForeColor.RGB=14659682

Engineer Toast

Posted 2015-11-25T15:06:27.810

Reputation: 5 769

You can get the bytecount down by removing the () in p() and converting With ActiveSheet. ... to With[Sheet1]. ... – Taylor Scott – 2017-09-27T20:29:16.133

@TaylorScott Dropping the parentheses is a good point and something I've previously ignored when removing auto-formatting. I'm not sure about assuming that the first sheet is named Sheet1, though. I suppose we can presume the user runs the code in a new file. – Engineer Toast – 2017-09-27T22:04:40.693

I think that because we can already assume that the user is taking input from clear cells or that a variable is uninitialized and at its default state that assuming the user is on the default Sheet1 object should probably be an accepted norm so long as you mention that that is part of the input/output condition as part of your solution – Taylor Scott – 2017-09-27T23:42:26.750

So apparently there is a Sheet1 object - so you can drop a byte by replacing With[Sheet1]. with With Sheet1. – Taylor Scott – 2017-11-12T16:56:27.200

@TaylorScott Ha, of course there is. If we assume it's a new, blank file, then Sheet1 is just the default code name of the first sheet. That's a nice 0.4% byte reduction. – Engineer Toast – 2017-11-13T15:59:30.950

One More thing, VBA will add on a " to the end of a line if it has an unterminated string, so you can change .text="PCG" to .text="PCG; AND you can move this subroutine to the Sheet1 CodePane, allowing you to remove the Sheet1. from the code entirely for a total of -8 bytes between the two – Taylor Scott – 2017-12-15T22:32:48.367

2

Python 3, 10,069 bytes

Writes the hex from the original logo to a new file.

with open('test.png', 'w+b') as image_file:
    for line in ['\x89PNG\r\n', '\x1a\n', '\x00\x00\x00\rIHDR\x00\x00\x00\x13\x00\x00\x00\x12\x08\x06\x00\x00\x00\xb9\x0c\xe5i\x00\x00\n', '\xa3iCCPICC Profile\x00\x00H\x89\x95\x97\x07T\x13\xe9\x16\xc7\xbf\x99I/\x94\x04"\x9d\xd0;R\x04\x02H\xaf\xa1\x08\xd2\xc1FH\x02\t%\x84@\x10\xb1#\xe2\n', '\xac\x05\x15\x91bAW)\n', "V@\xd6\x82\x88baQ\xec}A\x16\x01u],\xd8Py\x03<\xc2{\xef\xbc=\xef\xbc{\xce\x9d\xf9\x9d{\xee\xfc\xe7\xce7\xf3\x9d\xf3\x1f\x00(]\x1c\xb18\x15V\x00 M\x94%\t\xf3\xf3d\xc6\xc4\xc61\xf1\xbf\x03\x02\xc0\x00\x1ap\x02\xca\x1cn\xa6\xd8#44\x08\xfcm|\xbc\x07\xa0\x89\xf3m\x8b\t\xad\xbf\xef\xfb\xaf\xa1\xc8\xe3gr\x01\x80BQN\xe0er\xd3P>9\x91\\\xb1$\x0b\x00D\x80\xd6\xf5\x96f\x89'\xb8\x18e%\t: \xca{'8i\x8aONp\xc2\x14_\x99\xec\x89\x08\xf3B\xf9\t\x00\x04\n", "\x87#I\x02\x80<\x84\xd6\x99\xd9\xdc$T\x87B@\xd9J\xc4\x13\x8aPf\xa1\xec\xca\x15px(\xe7\xa0l\x9e\x96\x96>\xc1\x07P6N\xf8\x17\x9d\xa4\x7f\xd3L\x90ir8I2\x9ez\x96\xc9 x\x0b3\xc5\xa9\x9ce\xff\xe7r\xfc\xefHK\x95N\xdfC\x17M\x8a@\xe2\x1f6qF\xd7\xac&%=P\xc6\xa2\x84y!\xd3,\xe4M\xf6O\xb2@\xea\x1f9\xcd\xdcL\xaf\xb8i\xe6q\xbc\x03\xa7Y\x9a\x12\xe91\xcd\x1c\xc9\xcc\xb5\xc2,v\xc44K\xd2\xc3d\xfa\xfcL\x9fp\x99>\x9f\x1d$\x9b!u\x9e\x8c\x13\x85\xbe\xeci\xce\x15DDOs\xb60j\xde4g\xa6\x84\x07\xce\xf4x\xc9\xea\x12i\x98l\xe6D\x89\xaf\xec\x19\xd32gf\xe3rff\xc8\x12D\xf8\xcf\xcc\x16#\x9b\x81\xc7\xf7\xf6\x91\xd5E\x91\xb2~q\x96\xa7LS\x9c\x1a*\xeb\xe7\xa7\xfa\xc9\xea\x99\xd9\xe1\xb2k\xb3\xd0\x0fl\x9a\x939\x01\xa13:\xa1\xb2\xf5\x01^@\x08D\x80\x0f\xd2\x00'\x8b\x9f\x9351\xa8W\xbax\x99D\x98$\xc8bz\xa0;\x85\xcfd\x8b\xb8\x96\xe6L\x1b+k;\x00&\xf6\xdd\xd4k}\xcf\x98\xdcO\x10\xe3\xdaLm\xb91\x00\xeee\x00\xc053\xb5\xe8c\x00\x1cv\x07@\xf9\xecLM\xef;\x00t\xb4\xb7\xb5\x93+\x95dO\xd50\x13\x07, \x01y\xa0\x04T\x81\x16\xd0\x03\xc6\xc0\x02\xd8\x00{\xe0\x0c\xdc\x81\x0f\x08\x00! \x02\xc4\x82\xc5\x80\x0b\x04\xe8\xbc\x12\xb0\x14\xac\x00kA\x01(\x02[\xc0\x0eP\x0e\xf6\x80\xfd\xa0\x06\x1c\x01\xc7A38\x03.\x80\xcb\xe0:\xb8\t\xee\x82\xc7\xa0\x17\x0c\x80W`\x04|\x04c\x10\x04\xe1!*D\x87T!m\xc8\x002\x83l \x16\xe4\n", '\xf9@AP\x18\x14\x0b\xc5CI\x90\x08\x92B+\xa0uP\x11T\x02\x95C\xfb\xa0Z\xe8\x18t\x1a\xba\x00]\x85z\xa0\x87P\x1f4\x0c\xbd\x83\xbe\xc2\x08L\x81\x95`M\xd8\x10\x9e\r\xb3`\x0f8\x10\x8e\x80\x17\xc1Ip\x06\x9c\x0b\xe7\xc3\x9b\xe02\xb8\x1a>\x0c7\xc1\x17\xe0\xeb\xf0]\xb8\x17~\x05\x8f"\x00!#\x0cD\x07\xb1@X\x88\x17\x12\x82\xc4!\x89\x88\x04Y\x85\x14"\xa5H5\xd2\x80\xb4"\x9d\xc8m\xa4\x17y\x8d|\xc1\xe00t\x0c\x13c\x81q\xc6\xf8c"1\\L\x06f\x15\xa6\x18S\x8e\xa9\xc14a:0\xb71}\x98\x11\xcc\x0f,\x15\xab\x815\xc3:a\xd9\xd8\x18l\x12v)\xb6\x00[\x8a=\x88=\x85\xbd\x84\xbd\x8b\x1d\xc0~\xc4\xe1p\x0c\x9c\x11\xce\x01\xe7\x8f\x8b\xc5%\xe3\x96\xe3\x8aqU\x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_\xbe\xc3\xbes\xfd\xee\xbc\xbb=\xf7"\xef=\xb8\xbf\xf0~\xef\x03\xde\x83\xa1\x87\xa9\x0f\xdf>\xca~4\xf6x\xcd\x13\xec\x93\xc2\xa7\n', 'OK\x9fi<\xab\xfe\xdd\xe4\xf7\xc6^\xfb\xde\xb3}\xde}]\xcf\xc3\x9f?\xee\xe7\xf6\xbf\xfa#\xf3\x8fo\x03\xf9/\xa8/J\x07\xb5\x07k\x87l\x86\xce\x0c\xfb\x0e\xdf|\xb9\xe0\xe5\xc0+\xf1\xab\xb1\xd7\x05\x7f*\xfeY\xf9\xc6\xf8\xcd\xc9\xbf\xdc\xff\xea\x1a\x89\x19\x19x+y;\xfe\xae\xf8\xbd\xea\xfbC\x1f\xe6|h\x1f\r\x1d}\xf61\xed\xe3\xd8\xa7\xc2\xcf\xaa\x9fk\xbe\xb0\xbet~\x8d\xfe:8\xb6\xf4\x1b\xfe[\xd9w\x93\xef\xad?\x02\x7f<\x19O\x1b\x1f\x17s$\x9cI+\x80\xa0\t\'&\x02\xf0\xee\x10\x00\xd4X\xd4+\xdc\x04\x80$7\xe5\x8b\'\x03\x9a\xf2\xf2\x93\x04\xfe\x8e\xa7\xbc\xf3d\xd8\x03\xb0\xbf\r\xf5"(\x06\xa0^\xa4j\r\x00\x06(\xd3\xd0\x9c\xb0E\x11\xee\x00\xb6\xb5\x95\xe5?#3\xd1\xd6fJ\x8b\x82\xbaK\xec\xe7\xf1\xf1\xf7\x9a\x00\xe0[\x01\xf8.\x19\x1f\x1f\xab\x1a\x1f\xff\x8e\xfao\xe4!\x00m\x19S~|"p\xe8_J\x89:\x0cUyv0\x13\xc1\x7f\xc6?\x00\xea\xa4\xff\x86H\x07*\xad\x00\x00\x01\x9biTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">\n', '   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n', '      <rdf:Description rdf:about=""\n', '            xmlns:exif="http://ns.adobe.com/exif/1.0/">\n', '         <exif:PixelXDimension>19</exif:PixelXDimension>\n', '         <exif:PixelYDimension>18</exif:PixelYDimension>\n', '      </rdf:Description>\n', '   </rdf:RDF>\n', '</x:xmpmeta>\n', '\x92\xfc\xe9\xf6\x00\x00\x01\xdcIDAT8\x11\xad\x94\xdfM\x1cA\x0c\xc6?\xcf\xcc\xbe\x11@\xa9 u\xa0\x1c\xa2\x03\x8aH\x0b\x89\x94\x16\x82\xeeJ\xa0\x88T\x90\x874\x92\xe7D,\xdc\xf3\xee\x8c\xf9ya\xc2\xe9 \x12\x87\xe2\x95\xd6\xf3\xc7\xfe\xc6\x1e\x7fc\xbb\xbb\xbdu7W\xae\xae)\x15e\xb9Rn\x9a\xbdH6+M\xae6\x984I%\x9bfK\x12\xb6B\xbb5\x15g?\x99Z5\xc6\x8b\xfb\xa4Z\x92\xbe\xfc\x18u\x88\xacW\xa7\x80\x9aR\xe3\xb08\xfbf\xbb\xf5CA\xf6\x0f\xdc\x9c\xbfW\xf6\x16\x19\xd5\xfd\xbd\x83\xe7$\xaaVH\x93+\xfa\x0f\xc2=G\xa6\x1e\xf9"\xd7\x97\x1f\x16\x1d\xbfO\xdf\x7f\xfd\x1d\xf7\xf5\x97\xd6\xba-\xa5\x90G\x01Z\xa6:\x8f\xd2\x1d\x02 \xc6]\xc7v\x1fw\xdd}\x1et\xa2\xcaN\x9a\x94\xb7K\x18\x86t\xd0e\xf2\xf8\xdb_\xdb\xb5\r\x8a\xc0&\n', '\xe0\x0fiv\x90}\xa7\x0e\xd8\x9d\xfb|\xd7\xce=\xc3\xcb\x14<{\x8a\xac\x1bv\x1d\x0e\x1d\xa4;\xbf\xb4\x96\xa2\x88\xfcl\xbc\x19\xfd\xf3\xcfm\xf7\x7f\x93\xde\\\x1c\xa9R\xc8\xd2\xd2\xbf#{-rk\x03\xa4\x85\x1e\xaaI\xeb\x8f\'\xaf\xf5{f\xf7-|\t\xc8\xad*%\xee\xac\xc2\xde\xcd\xeap\xc0\xab\xf3\xd3x\x9aD\x14<\xcb\xb2\xdft\x8d<U\xd9@\x90\x00\x1b\x1d!\xca\xbc\x14\x19\x0e\xce\x0c\xbe\xee\xdc\xe9\xd5\xea\x1dl"\x00\x1f\x82\n', '\xf2\xb8x|\x88Me\x98]\x80\xaaE\xce\xf0\xc5(s\xe5\x13@\xf4&N}\x92\xf5\xea\x88\t\xb9\x10\xce\x90*\xfb\x94q\xc6>\xb8J\x8eeyM\xac\xe5\x16,6e\x98\x9chK\xd1\xb2\xc28\xee"d}v\xbc\x90(z\x9f\xe1\x14Y\x84\xa5\x91F\x99y\xe2t\r\xfb3\x8e\xd0\x8d-\xc0"\xf7\x16\xa4\xe1\x9d1\xa4\x19\xbaf\x80\x97\xce\xb2DOTX+s\xd9\x14N\x98Y#3\x0e\x8b\xfey\x0f\x08\xf5\xf5\xc8\xe0\xdd\\\x98\x00\x00\x00\x00IEND\xaeB`\x82']:
        image_file.write(line)

Morgan Thrapp

Posted 2015-11-25T15:06:27.810

Reputation: 3 574

2

R, 189 bytes

image(t(matrix(as.integer(sapply(c(32736,28784,62968,62968,64504,65528,63736,63352,63359,64254,65532,63736,63352,62840,29936,32736),intToBits)[1:16,]),nr=16)),ax=F,col=c("white","#62B0DF"))

With indents for clarity:

image(t(matrix(as.integer(sapply(c(32736,28784,62968,62968,
                                   64504,65528,63736,63352,
                                   63359,64254,65532,63736,
                                   63352,62840,29936,32736),
                                 intToBits)[1:16,]),nr=16)),
      ax=F,col=c("white","#62B0DF"))

I'm shamelessly stealing the method from an old answer of mine: I take the base-2 representation of 16 numbers, make it into a 16x16 matrix of 1s and 0s and plot it as is.

Screenshot of the result

plannapus

Posted 2015-11-25T15:06:27.810

Reputation: 8 610

2

Google Blockly, 140 blocks

input

Produces

Output

Will add an explanation if requested. Try it here

Suggestions to reduce the massive function on the left are welcome!

Bassdrop Cumberwubwubwub

Posted 2015-11-25T15:06:27.810

Reputation: 5 707

2

Python 2, 211 bytes

from PIL import Image
I=Image.new('P',(16,16))
I.putdata(map(int,bin(eval('0xc003'+'0'*12+'718e4a5072164252418c'+'0'*8+'8001c003ff1fff3fff7f'))[2:]))
I.putpalette([111,174,221]+[255]*3)
I.resize((64,64)).show()

dieter

Posted 2015-11-25T15:06:27.810

Reputation: 2 010

1

PHP, 145 bytes, not competing

for(;$i<64;)echo strtr(sprintf("%016b\n",[49155,0,0,0,29070,19024,29206,16978,16780,0,0,32769,49155,65311,65343,65407][$i++/4]),["####","    "]);

I should use non-blank and colors instead, but I´m too tired atm.
Guess that will add 10 bytes or so to the count, maybe more.

Titus

Posted 2015-11-25T15:06:27.810

Reputation: 13 814

2Why is it non-competing? – Kodos Johnson – 2017-03-22T23:15:27.590

@KodosJohnson It has no colors. And the OP said "non-whitespace characters" – Titus – 2017-03-23T03:09:00.507

1

Excel VBA, 178 Bytes

Anonymous VBE Immediate window function that takes no input and outputs the PCG Favicon (exactly as in the prompt above) to the range

Cells.RowHeight=48:[C1:N13,A2:P11,B12:O12,I14:I16,J14:J15,K14].Interior.Color=&HDFB062:[B5:B9,C5:D5,C7:D7,E6,G6:G8,H5:I5,J6,J8,H9:I9,L6:L8,O7:O9,M5:O5,M9:N9,N7].Interior.Color=-1

PCG Favicon

Taylor Scott

Posted 2015-11-25T15:06:27.810

Reputation: 6 709

1

MATLAB, 153 150 140 bytes

a=65535;imshow(imresize(dec2bin([16380,a,a,a,36465,46511,36329,48557,48755,a,a,32766,16380,32*[7 6 4]],16)-47,8,'n'),[1 1 1;0.39 0.69 0.88])

The code takes an array of 16bit numbers (sadly there is no way of encoding them that reduces the byte count apart from reading from a presaved binary file). EDIT: With a little bit of creativity in how the array is made, I've saved 3 bytes, and with a little bit more and an extra variable, I can save another 10 on top of that.

With this array, it is converted to a binary string where an ascii '1' represents blue and an ascii '0' is white. The array is 2D at this point because each of the 16 numbers becomes a 16 character string.

I subtract 47 to convert this into an array of 1's and 2's (needed for the next bit), where each element represents one pixel. Again this remains as 2D and is our image data.

The image is then scaled up by a factor of 8 using nearest neighbour to produce an image which is at least the required 64x64px minimum size - in fact it is 128x128 because somehow I divided 64 by 16 to get 8 >_< (don't ask!).

Finally this is displayed using a colour map where any 1 becomes white and any 2 becomes the required #62B0DF shade of blue.

This is the output:

Logo

Tom Carpenter

Posted 2015-11-25T15:06:27.810

Reputation: 3 990

1

Processing, 211 bytes

noStroke();int[]n={49155,0,173175182,1245866062,12674,-2147418112,-117456893,-16777985};for(int x=0;x<256;x++){if(((n[floor(x/32)]>>(x%32))&1)>0)fill(255);else fill(98,176,223);rect(4*(x%16),4*floor(x/16),4,4);}

Storing the pixels inside signed integers (seems to be the most efficient way, I'll maybe try 2^64 integers) and then printing them in a frame.

enter image description here

6infinity8

Posted 2015-11-25T15:06:27.810

Reputation: 371

1

Swift (Playground), 599 Bytes

import UIKit;class P:UIView {var b=UIBezierPath();func a(x:CGFloat,y:CGFloat){b.addLineToPoint(CGPoint(x:x,y:y))};override func drawRect(rect:CGRect){UIColor(red:0.384,green:0.690,blue:0.875,alpha:1).setFill();UIBezierPath(roundedRect:CGRectMake(0,0,200,159),cornerRadius:45).fill();b.moveToPoint(CGPoint(x:102, y:146));a(102,y:200);a(157,y:146);a(102,y:146);b.closePath();b.fill();"PCG".drawInRect(CGRectMake(35,41,200,121),withAttributes:[NSFontAttributeName: UIFont(name:".AppleSystemUIFontBold",size: 64)!,NSForegroundColorAttributeName:UIColor.whiteColor()])}}
P(frame: CGRectMake(0,0,200,200))

I decided to give it a go, since drawing in Swift is pretty straightforward, and it's not usually golfed like this. Ended up loosing precious bytes with the text... Damn you NSDescriptiveVariableNames!

Here's how it looks in the playground:

Result

I think I could golf it more by aliasing things like CGRectMake, grouping objects in the a function etc.

Moustach

Posted 2015-11-25T15:06:27.810

Reputation: 111

Couldn't you remove leading zeroes from floats, like 0.384 to .384? or does swift not support that? – sagiksp – 2017-03-21T08:40:01.657

0

tcl/tk, 113

grid [canvas .c]
.c cr o 2 2 66 48 -f #62B0DF
.c cr t 36 24 -te PCG -fi #FFF
.c cr p 30 66 30 47 44 47 -f #62B0DF

Tcl/tk, 144

grid [canvas .c]
.c create oval 2 2 66 48 -fill #62B0DF
.c create text 36 24 -text PCG -fill #FFF
.c create poly 30 66 30 47 44 47 -fill #62B0DF

pcg logo

sergiol

Posted 2015-11-25T15:06:27.810

Reputation: 3 055

0

C (gcc), 188 bytes

y;main(x){int d[]={16380,~0,~0,~0,36465,62893,38833,46525,52861,~0,~0,32766,16380,1792,768,256};for(;y<64;y++){for(x=0;x<16;)printf("\33[48;5;%dm%*s",(d[y/4]>>x++)&1?14:7,8,"");puts("");}}

Try it online!

Uses ANSI escape codes to print 128 horizontal and 64 vertical colored spaces.

ANSI PCG (Image resized.)

Jonathan Frech

Posted 2015-11-25T15:06:27.810

Reputation: 6 681

0

C++ with SFML, 607 bytes

#include<SFML\Graphics.hpp>
using namespace sf;using c=Color;using x=Vector2f;RenderWindow w(VideoMode(324,324),"");void p(){RectangleShape r({224.f,144.f});r.setFillColor(c(98,176,223));Vertex v[3]={x(162,324),x(243,224),x(162,224)};for(int i=0;i<3;++i)v[i].color=c(c(98,176,223));Font f;if(!f.loadFromFile("a.ttf"))return;Text t("PCG",f,150);t.setPosition(50,20);while(w.isOpen()){Event e;while(w.pollEvent(e))if(e.type==0)w.close();w.clear(c::White);for(int i=0;i<628;++i){r.setPosition(50+cos(float(i)/100.f)*50,50+sin(float(i)/100.f)*50);w.draw(r);}w.draw(v,3,PrimitiveType(3));w.draw(t);w.display();}}

Code that calls the function :

int main() {
    w.setFramerateLimit(60);
    w.setVerticalSyncEnabled(true);
    p();
}

Requirements :

  • You need to have a valid ttf file called a.ttf in the current directory where the executable is running, so it can load the fonts to display the text

  • You need to have the corresponding SFML DLLs in the current directory where the executable is running

Result :

PPGC Icon with C++ and SFML

Explanations :

#include<SFML\Graphics.hpp>

using namespace sf;
using c=Color;
using x=Vector2f;

//Create the window that will display stuff. 324x324 dimensions
RenderWindow w(VideoMode(324,324),"");

void p(){

    //Creation of the rectangle
    RectangleShape r({224.f,144.f});
    r.setFillColor(c(98,176,223)); //Logo Color wanted

    //Vertex to draw a blue triangle
    Vertex v[3]={x(162,324),x(243,224),x(162,224)};
    for(int i=0;i<3;++i)
        v[i].color=c(c(98,176,223));

    //Creation an load of the font
    Font f;
    if(!f.loadFromFile("a.ttf"))
        return;

    //Creating the text object that will be used to draw the PCG text
    Text t("PCG",f,150);
    t.setPosition(50,20);

    //Main loop, will run while the window is open
    while(w.isOpen()){
        Event e;
        while(w.pollEvent(e))
            //sf::Event::Close int value is 0
            //It will be triggered if you click on the red cross, or press Alt+F4
            if(e.type==0)
                w.close();

        //Clear the window in white
        w.clear(c::White);

        //6.28 = 2*PI, the number of radians that nearly equals 360 degrees
        for(int i=0;i<628;++i){
            //It draws 628 rectangles, the top left part of the rectangle will do a circle
            //Same for every points of the rectangle
            r.setPosition(50+cos(float(i)/100.f)*50,50+sin(float(i)/100.f)*50);
            w.draw(r);
        }

        //sf::PrimitiveType::Triangle int value is 3
        w.draw(v,3,PrimitiveType(3));
        //Draw the text
        w.draw(t);
        w.display();
    }
}

HatsuPointerKun

Posted 2015-11-25T15:06:27.810

Reputation: 1 891