Obj-C++ / Cocoa, 777 bytes
#include <Cocoa/Cocoa.h> float r=0;NSTimer*t;@implementation V:NSView-(void)drawRect:(NSRect)d{CGContextRef c=(CGContextRef)[[NSGraphicsContext currentContext]graphicsPort];CGContextTranslateCTM(c,50,50);CGContextRotateCTM(c,r-=M_PI/300);CGContextSetRGBFillColor(c,.5,0,.5,1);CGContextFillRect(c,CGRectMake(38,0,1,1));t=[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(x)userInfo:0 repeats:0];}-(void)x{[self setNeedsDisplay:1];}@end int main(){NSApplication*a=[[NSApplication alloc]init];NSWindow*w=[[NSWindow alloc]initWithContentRect:NSMakeRect(0,0,100,100)styleMask:1 backing:2 defer:0];[w center];[w makeKeyAndOrderFront:nil];w.backgroundColor=[NSColor whiteColor];w.contentView=[[V alloc]initWithFrame:CGRectMake(0,0,100,100)];[a run];return 0;} So this is probably the worst way to do anything, but I figured I'd try.
Can be compiled on a Mac (mine anyway) with g++ -framework Cocoa file.mm and run from the terminal (ctrl-C to quit, since it's not an app).
