Tag: undo redo

撤消绘画应用程序中的绘图

我正在使用OpenGl框架进行绘制应用程序,我被卡在UNDO / REDO选项..我实现的代码是这样的: -(void)undo_called { artbrushAppDelegate *app=(artbrushAppDelegate *)[[UIApplication sharedApplication]delegate]; mbrushscale=app.brushscale; brushimage=app.brush_image; Erase=YES; [self playRayundo]; } -(void)playRayundo { artbrushAppDelegate *app=(artbrushAppDelegate *)[[UIApplication sharedApplication]delegate]; glColor4f(app.r1g, app.b1g, app.g1g, 0); NSLog(@"%f",app.r1g); if(undo != NULL) { for(int l = 0; l < [undo count]; l++) { //replays my writRay -1 because of location point for(int p = 0; p < [[undo […]