Changeset 1098 for trunk/src/plot_object.m
- Timestamp:
- Apr 13, 2021, 7:19:35 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plot_object.m
r1093 r1098 136 136 137 137 %% determine the coordinates xline, yline,xsup,xinf, yinf,ysup determining the new object plot 138 %test_line= isequal(ObjectData.Type,'points')||isequal(ObjectData.Type,'line')||...139 % isequal(ObjectData.Type,'polyline')||isequal(ObjectData.Type,'polygon')|| isequal(ObjectData.Type,'plane')|| isequal(ObjectData.Type,'volume');140 %test_patch=isequal(ObjectData.ProjMode,'inside')||isequal(ObjectData.ProjMode,'outside')||isequal(ObjectData.Type,'volume')...141 % ||isequal(ObjectData.ProjMode,'mask_inside')||isequal(ObjectData.ProjMode,'mask_outside');142 138 test_line=ismember(ObjectData.Type,{'points','line','polyline','polygon','plane','plane_z','volume'}); 143 139 test_patch=ismember(ObjectData.ProjMode,{'inside','outside','mask_inside','mask_outside'}); … … 346 342 %complement missing points 347 343 if length(PlotData.SubObject)>nbpoints% fpoints in excess on the graph 348 for ii=nbpoints+1: length(PlotData.SubObject) ;344 for ii=nbpoints+1: length(PlotData.SubObject) 349 345 if ishandle(PlotData.SubObject(ii)) 350 346 delete(PlotData.SubObject(ii)) … … 352 348 end 353 349 end 354 % NbDeformPoint=nbpoints;355 356 350 if nbpoints>length(PlotData.SubObject) 357 351 for ipt=length(PlotData.SubObject)+1:nbpoints … … 374 368 if isfield(PlotData,'DeformPoint') 375 369 NbDeformPoint=length(PlotData.DeformPoint); 376 if NbDeformPoint>nbpoints% fpoints in excess on the graph 370 % delete deformpoints in excess on the graph 371 if NbDeformPoint>nbpoints 377 372 for ii=nbpoints+1:NbDeformPoint 378 373 if ishandle(PlotData.DeformPoint(ii)) … … 382 377 NbDeformPoint=nbpoints; 383 378 end 379 % update the position of the existing deformpoints 384 380 for ipt=1:NbDeformPoint 385 381 if ishandle(PlotData.DeformPoint(ipt)) … … 389 385 end 390 386 end 387 % add neww deform points if requested 391 388 if nbpoints>length(PlotData.DeformPoint) 392 389 for ipt=length(PlotData.DeformPoint)+1:nbpoints 393 390 PlotData.DeformPoint(ipt)=line(xline(ipt),yline(ipt),'Color',col,'LineStyle','-','Tag','DeformPoint',... 394 ' SelectionHighlight','off','UserData',hplot);391 'Marker','.','MarkerSize',12,'SelectionHighlight','off','UserData',hplot); 395 392 end 396 393 set(hplot,'UserData',PlotData) … … 431 428 %% create the object 432 429 if test_newobj 433 % axes(haxes)434 430 hother=findobj('Tag','proj_object');%find all the proj objects 435 431 for iobj=1:length(hother) … … 456 452 for ipt=1:length(xline) 457 453 PlotData.DeformPoint(ipt)=line(ObjectData.Coord(ipt,1),ObjectData.Coord(ipt,2),'Color',... 458 col,'LineStyle','none',' SelectionHighlight','off','UserData',hh,'Tag','DeformPoint');454 col,'LineStyle','none','Marker','.','MarkerSize',12,'SelectionHighlight','off','UserData',hh,'Tag','DeformPoint'); 459 455 %create circle around each point 460 456 if ~isequal(YMax,0) … … 470 466 for ipt=1:sizcoord(1) 471 467 PlotData.DeformPoint(ipt)=line(ObjectData.Coord(ipt,1),ObjectData.Coord(ipt,2),'Color',... 472 col,'LineStyle','none','Marker','.',' Tag','DeformPoint','SelectionHighlight','off','UserData',hh);468 col,'LineStyle','none','Marker','.','MarkerSize',12,'Tag','DeformPoint','SelectionHighlight','off','UserData',hh); 473 469 end 474 470 case {'plane','volume'}
Note: See TracChangeset
for help on using the changeset viewer.