Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -0,0 +1,52 @@
package {
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.Event;
public class Pinstripe extends Sprite {
public function Pinstripe():void {
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void {
var data:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight, false, 0xFFFFFFFF);
data.lock();
var w:uint = data.width, h:uint = data.height / 4;
var x:uint, y:uint = 0, i:uint, px:uint, colour:uint, maxy:uint = h;
for ( i = 1; i <= 4; i++ ) {
for ( ; y < maxy; y++ ) {
colour = 0xFF000000;
px = 1;
for ( x = 0; x < w; x++ ) {
if ( px == i ) {
colour = (colour == 0xFF000000) ? 0xFFFFFFFF : 0xFF000000;
px = 1;
}
else px++;
data.setPixel32(x, y, colour);
}
}
maxy += h;
}
data.unlock();
addChild(new Bitmap(data));
}
}
}

View file

@ -0,0 +1,28 @@
/*Abhishek Ghosh, 6th November 2013, Rotterdam*/
#include<graphics.h>
#include<conio.h>
#define sections 4
int main()
{
int d=DETECT,m,maxX,maxY,x,y,increment=1;
initgraph(&d,&m,"c:/turboc3/bgi");
maxX = getmaxx();
maxY = getmaxy();
for(y=0;y<maxY;y+=maxY/sections)
{
for(x=0;x<maxX;x+=increment)
{
setfillstyle(SOLID_FILL,(x/increment)%2==0?BLACK:WHITE); //The only line which differs
bar(x,y,x+increment,y+maxY/sections);
}
increment++;
}
getch();
closegraph();
return 0;
}

View file

@ -0,0 +1,26 @@
nomainwin
UpperLeftX=1
UpperLeftY=1
WindowWidth=DisplayWidth
WindowHeight=DisplayHeight
graphicbox #gr.gr, -1, -1, DisplayWidth+4, DisplayHeight+1
open "Pinstripe/Display" for window_popup as #gr
#gr.gr "down"
#gr.gr "trapclose [quit]"
#gr.gr "color black"
#gr.gr "backcolor black"
for w = 1 to 4
y1=y2
y2=y1+DisplayHeight/4
for x = w to DisplayWidth+4 step w*2
#gr.gr "place ";x;" ";y1;"; boxfilled ";x+w;" ";y2
next
next
wait
[quit]
close #gr
end