Skip to content

Instantly share code, notes, and snippets.

@hongymagic
Created December 19, 2011 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hongymagic/1495298 to your computer and use it in GitHub Desktop.
Save hongymagic/1495298 to your computer and use it in GitHub Desktop.
SF Logo (svg and Raphael)
var
container = 'rsr',
scale = 1.00, /* TODO: doesn't work atm */
width = 170.48 * scale,
height = 203.22 * scale,
rsr = Raphael(container, width, height),
background,
lower,
upper,
text;
background = rsr.set();
// Lower quadrant
lower = rsr.path("M108.572 12.8652 C95.7071 0 74.8477 0 61.9825 12.8652 C61.4961 13.3535 61.0332 13.8555 60.584 14.3642 C55.1543 19.793 36.0811 38.8672 24.1758 50.7734 L40.2227 66.8198 L46.0918 72.689 C46.5801 73.0757 47.0567 73.4839 47.5078 73.937 C53.7774 80.2046 53.7774 90.3667 47.5098 96.6343 C41.2422 102.902 31.0801 102.902 24.8116 96.6343 C18.545 90.3667 18.545 80.2046 24.8125 73.937 C26.8868 71.8628 29.3907 70.4897 32.0371 69.7886 C33.8174 69.3159 35.6602 69.1499 37.4844 69.2983 L21.5664 53.3808 C17.4048 57.543 14.5786 60.3686 14.3145 60.6323 C13.8223 61.0698 13.3369 61.519 12.8653 61.9897 C0 74.8569 0 95.7143 12.8653 108.58 C25.7315 121.447 46.5899 121.447 59.4551 108.582 C72.3223 95.7143 72.3203 74.8569 59.4551 61.9897 C56.9414 59.4761 54.1192 57.4609 51.1133 55.9297 C49.9278 55.3262 48.7149 54.7988 47.4786 54.3476 C47.4766 54.3457 47.4746 54.3457 47.4727 54.3457 L69.7813 32.0371 C70.4825 29.3926 71.8536 26.8887 73.9297 24.8125 C80.1973 18.5449 90.3594 18.5449 96.625 24.8125 C102.895 31.0801 102.895 41.2422 96.627 47.5098 C90.3594 53.7773 80.1973 53.7773 73.9278 47.5098 C71.1934 44.7754 69.6543 41.2988 69.3067 37.7305 L55.9219 51.1133 C57.4532 54.1191 59.4688 56.9414 61.9825 59.4546 C74.8496 72.3198 95.7071 72.3218 108.572 59.4565 C121.44 46.5898 121.438 25.7324 108.572 12.8652 Z");
lower.attr({
id: 'lower',
parent: 'background',
fill: '#000000',
" fill-rule": 'evenodd',
stroke: 'none',
'stroke-width': '1',
'stroke-opacity': '1'
});
lower.transform("t49.0366, 49.0708").data('id', 'lower');
// Upper quadrant
upper = rsr.path("M12.8667 108.58 C25.7315 121.445 46.5903 121.445 59.4561 108.58 C59.9434 108.094 60.4053 107.592 60.8555 107.083 C66.2852 101.653 85.3579 82.5806 97.2632 70.6743 L81.2163 54.6274 L75.3472 48.7563 C74.8579 48.3716 74.3814 47.9614 73.9302 47.5102 C67.6616 41.2407 67.6616 31.0791 73.9292 24.8115 C80.1968 18.5439 90.3589 18.5439 96.6265 24.8125 C102.894 31.0801 102.894 41.2427 96.6265 47.5102 C94.5523 49.5845 92.0484 50.9575 89.4019 51.6587 C87.6206 52.1294 85.7798 52.2973 83.9546 52.147 L99.8726 68.0649 C104.035 63.9028 106.861 61.0786 107.124 60.813 C107.617 60.3755 108.101 59.9282 108.574 59.4556 C121.439 46.5903 121.439 25.7314 108.574 12.8662 C95.7066 0 74.8491 0 61.9829 12.8652 C49.1167 25.7314 49.1187 46.5903 61.9839 59.4556 C64.4981 61.9692 67.3203 63.9848 70.3252 65.5181 C71.5112 66.1216 72.7251 66.6489 73.9605 67.1001 C73.9624 67.1001 73.9644 67.1001 73.9663 67.102 L51.6582 89.4087 C50.957 92.0552 49.5845 94.5591 47.5098 96.6333 C41.2422 102.901 31.0801 102.901 24.813 96.6352 C18.5444 90.3657 18.5444 80.2036 24.812 73.936 C31.0796 67.6684 41.2417 67.6684 47.5103 73.938 C50.2446 76.6704 51.7842 80.147 52.1328 83.7173 L65.5176 70.3325 C63.9859 67.3266 61.9702 64.5044 59.4561 61.9907 C46.5899 49.1255 25.7315 49.1235 12.8657 61.9907 C0 74.8559 0.0005 95.7153 12.8667 108.58 Z");
upper.attr({
id: 'upper',
parent: 'background',
fill: '#000000',
" fill-rule": 'evenodd',
stroke: 'none',
'stroke-width': '1',
'stroke-opacity': '1'
});
upper.transform("t0, 0").data('id', 'upper');
background.attr({
'id': 'background',
'name': 'background'
});
// Text "SF FUND"
var text = rsr.set();
var path_a = rsr.path("M5.0781 10.1289 L3.2227 9.001 C2.0586 8.291 1.2305 7.5918 0.7383 6.9033 C0.2461 6.2158 0 5.4248 0 4.5293 C0 3.1865 0.4658 2.0957 1.3975 1.2578 C2.3291 0.4199 3.5401 0 5.0293 0 C6.4531 0 7.7598 0.4004 8.9473 1.1992 L8.9473 3.9707 C7.7188 2.789 6.3965 2.1973 4.9805 2.1973 C4.1826 2.1973 3.5274 2.3828 3.0156 2.751 C2.502 3.1201 2.2461 3.5918 2.2461 4.168 C2.2461 4.6777 2.4346 5.1562 2.8125 5.6025 C3.1904 6.0488 3.7979 6.5166 4.6348 7.0068 L6.499 8.1103 C8.5791 9.3525 9.6192 10.9336 9.6192 12.8545 C9.6192 14.2217 9.1612 15.332 8.2461 16.1875 C7.3301 17.041 6.1406 17.4687 4.6758 17.4687 C2.9903 17.4687 1.457 16.9512 0.0733 15.916 L0.0733 12.8144 C1.3916 14.4853 2.918 15.3203 4.6504 15.3203 C5.416 15.3203 6.0528 15.1074 6.5615 14.6816 C7.0694 14.2558 7.3242 13.7226 7.3242 13.082 C7.3242 12.0449 6.5752 11.0596 5.0781 10.1289 Z");
path_a.attr({
"clip-path": 'url(#Clip0)',
parent: 'background',
fill: '#000000',
" fill-rule": 'evenodd',
stroke: '#161413',
" stroke-width": '0.25',
" stroke-linecap": 'butt',
" stroke-linejoin": 'miter',
" stroke-dasharray": 'none',
'stroke-opacity': '1'
});
path_a.transform("t37.1123, 185.625").data('id', 'path_a');
var path_b = rsr.path("M0 0 L9.0938 0 L9.0938 2.1719 L2.4414 2.1719 L2.4414 6.9336 L9.0938 6.9336 L9.0938 9.1055 L2.4414 9.1055 L2.4414 17.0527 L0 17.0527 L0 0 Z");
path_b.attr({
"clip-path": 'url(#Clip0)',
parent: 'background',
fill: '#000000',
" fill-rule": 'evenodd',
stroke: '#161413',
" stroke-width": '0.25',
" stroke-linecap": 'butt',
" stroke-linejoin": 'miter',
" stroke-dasharray": 'none',
'stroke-opacity': '1'
});
path_b.transform("t49.041, 185.846").data('id', 'path_b');
var path_c = rsr.path("M0 0 L9.0942 0 L9.0942 2.1719 L2.4419 2.1719 L2.4419 6.9336 L9.0942 6.9336 L9.0942 9.1055 L2.4419 9.1055 L2.4419 17.0527 L0 17.0527 L0 0 Z");
path_c.attr({
"clip-path": 'url(#Clip0)',
parent: 'background',
fill: '#000000',
" fill-rule": 'evenodd',
stroke: '#161413',
" stroke-width": '0.25',
" stroke-linecap": 'butt',
" stroke-linejoin": 'miter',
" stroke-dasharray": 'none',
'stroke-opacity': '1'
});
path_c.transform("t68.7686, 185.846").data('id', 'path_c');
var path_d = rsr.path("M12.2207 0 L14.6739 0 L14.6739 9.6797 C14.6739 10.9902 14.5782 11.9785 14.3868 12.6465 C14.1954 13.3135 13.959 13.8691 13.6797 14.3125 C13.3985 14.7558 13.0547 15.1523 12.6465 15.5019 C11.2969 16.666 9.5313 17.248 7.3496 17.248 C5.127 17.248 3.3457 16.6699 2.002 15.5146 C1.5957 15.1562 1.252 14.7558 0.9707 14.3125 C0.6914 13.8691 0.459 13.3262 0.2754 12.6826 C0.0918 12.04 0 11.0312 0 9.6553 L0 0 L2.4551 0 L2.4551 9.6797 C2.4551 11.2832 2.6368 12.3984 3.0039 13.0244 C3.3692 13.6514 3.9278 14.1533 4.6758 14.5322 C5.4258 14.9101 6.3086 15.0996 7.3243 15.0996 C8.7735 15.0996 9.9532 14.7207 10.8653 13.9648 C11.3457 13.5576 11.6914 13.0781 11.9024 12.5234 C12.1153 11.9707 12.2207 11.0224 12.2207 9.6797 L12.2207 0 Z");
path_d.attr({
"clip-path": 'url(#Clip0)',
parent: 'background',
fill: '#000000',
" fill-rule": 'evenodd',
stroke: '#161413',
" stroke-width": '0.25',
" stroke-linecap": 'butt',
" stroke-linejoin": 'miter',
" stroke-dasharray": 'none',
'stroke-opacity': '1'
});
path_d.transform("t80.8198, 185.846").data('id', 'path_d');
var path_e = rsr.path("M13.4765 0 L15.7968 0 L15.7968 17.0527 L13.6972 17.0527 L2.2949 3.9189 L2.2949 17.0527 L0 17.0527 L0 0 L1.9785 0 L13.4765 13.2441 L13.4765 0 Z");
path_e.attr({
"clip-path": 'url(#Clip0)',
parent: 'background',
fill: '#000000',
" fill-rule": 'evenodd',
stroke: '#161413',
" stroke-width": '0.25',
" stroke-linecap": 'butt',
" stroke-linejoin": 'miter',
" stroke-dasharray": 'none',
'stroke-opacity': '1'
});
path_e.transform("t98.398, 185.846").data('id', 'path_e');
var path_f = rsr.path("M0 17.0283 L0 0 L5.75 0 C8.0683 0 9.9043 0.3476 11.2539 1.043 C12.6054 1.7392 13.6796 2.7627 14.4765 4.1133 C15.2753 5.4648 15.6738 6.9375 15.6738 8.5322 C15.6738 9.6719 15.4531 10.7617 15.0136 11.8037 C14.5742 12.8457 13.9472 13.7617 13.1347 14.5508 C12.3046 15.3642 11.3398 15.9785 10.2421 16.3935 C9.5976 16.6465 9.0078 16.8144 8.4707 16.9004 C7.9336 16.9853 6.9082 17.0283 5.3945 17.0283 L0 17.0283 Z M5.4921 2.1719 L2.4414 2.1719 L2.4414 14.8555 L5.5664 14.8555 C6.7871 14.8555 7.7343 14.7715 8.4101 14.6055 C9.0859 14.4385 9.6484 14.2266 10.1015 13.9707 C10.5527 13.7139 10.9648 13.3984 11.3398 13.0244 C12.5449 11.8037 13.1464 10.2617 13.1464 8.3984 C13.1464 6.5664 12.5273 5.0742 11.291 3.918 C10.8359 3.4863 10.3125 3.1328 9.7226 2.8555 C9.1328 2.5801 8.5722 2.3965 8.0449 2.3066 C7.5156 2.2168 6.664 2.1719 5.4921 2.1719 Z");
path_f.attr({
"clip-path": 'url(#Clip0)',
parent: 'background',
fill: '#000000',
" fill-rule": 'evenodd',
stroke: '#161413',
" stroke-width": '0.25',
" stroke-linecap": 'butt',
" stroke-linejoin": 'miter',
" stroke-dasharray": 'none',
'stroke-opacity': '1'
});
path_f.transform("t117.269, 185.846").data('id', 'path_f');
text.attr({
'id': 'text',
'clip-path': 'url(#Clip0)',
'parent': 'background',
'name': 'text'
});
// Gruops
var rsrGroups = [background, text];
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment