Mercurial > hg > octave-lyh
comparison src/graphics/opengl/gl-render.cc @ 7838:0a2ba0053fbd
Render marker of patch objects.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Thu, 21 Feb 2008 16:01:54 +0100 |
parents | 57095ca98533 |
children | d7737a4268b7 |
comparison
equal
deleted
inserted
replaced
7837:57095ca98533 | 7838:0a2ba0053fbd |
---|---|
2440 } | 2440 } |
2441 | 2441 |
2442 if (! props.marker_is ("none") && | 2442 if (! props.marker_is ("none") && |
2443 ! (props.markeredgecolor_is ("none") && props.markerfacecolor_is ("none"))) | 2443 ! (props.markeredgecolor_is ("none") && props.markerfacecolor_is ("none"))) |
2444 { | 2444 { |
2445 // FIXME: implement this | 2445 bool do_edge = ! props.markeredgecolor_is ("none"); |
2446 bool do_face = ! props.markerfacecolor_is ("none"); | |
2447 | |
2448 Matrix mecolor = props.get_markeredgecolor_rgb (); | |
2449 Matrix mfcolor = props.get_markerfacecolor_rgb (); | |
2450 Matrix cc (1, 3, 0.0); | |
2451 | |
2452 if (mecolor.numel () == 0 && props.markeredgecolor_is ("auto")) | |
2453 { | |
2454 mecolor = props.get_edgecolor_rgb (); | |
2455 do_edge = ! props.edgecolor_is ("none"); | |
2456 } | |
2457 | |
2458 if (mfcolor.numel () == 0 && props.markerfacecolor_is ("auto")) | |
2459 { | |
2460 mfcolor = props.get_facecolor_rgb (); | |
2461 do_face = ! props.facecolor_is ("none"); | |
2462 } | |
2463 | |
2464 init_marker (props.get_marker (), props.get_markersize (), | |
2465 props.get_linewidth ()); | |
2466 | |
2467 for (int i = 0; i < nf; i++) | |
2468 for (int j = 0; j < count_f(i); j++) | |
2469 { | |
2470 int idx = int (f(i,j) - 1); | |
2471 | |
2472 if (clip(idx)) | |
2473 continue; | |
2474 | |
2475 Matrix lc = (do_edge ? (mecolor.numel () == 0 ? | |
2476 vdata(i,j).get_rep ()->color : mecolor) | |
2477 : Matrix ()); | |
2478 Matrix fc = (do_face ? (mfcolor.numel () == 0 ? | |
2479 vdata(i,j).get_rep ()->color : mfcolor) | |
2480 : Matrix ()); | |
2481 | |
2482 draw_marker (v(idx,0), v(idx,1), (has_z ? v(idx,2) : 0), lc, fc); | |
2483 } | |
2484 | |
2485 end_marker (); | |
2446 } | 2486 } |
2447 } | 2487 } |
2448 | 2488 |
2449 void | 2489 void |
2450 opengl_renderer::set_viewport (int w, int h) | 2490 opengl_renderer::set_viewport (int w, int h) |