Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

objective c - Animating the drawing of a line programtaically using Quartz 2d on IOS -


i'm trying draw animated growing line using quartz 2d, adding points existing line, gradually on time. started drawing new line, in drawrect method of uiview, obtaining cgcontextref, setting draw properties, , moving first point (0,0).

cgcontextref context= uigraphicsgetcurrentcontext(); cgcontextsetstrokecolorwithcolor(context,[uicolor bluecolor].cgcolor); cgcontextsetlinewidth(context, 2); cgcontextmovetopoint(context,0,0); 

later, in next drawrect call, tried extending line, again, obtaining cgcontextref, , adding new point it.

gcontextref context= uigraphicsgetcurrentcontext(); cgcontextaddlinetopoint(context,x,y); 

but seems current cgcontextref doesn't have record of previous cgcontextmovetopoint command last drawrect call, therefore doesn't have reference started drawing line.

am doing wrong here? there way refering drawn line?

you need treat each call drawrect if starting scratch. if asked update subrect of view, should assume state associated graphics context, such drawing position , colours, have been reset. in case, need keep track of start position , redraw whole line each time.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -