mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	prettypoly function
This commit is contained in:
		
							
								
								
									
										18
									
								
								polygons.cpp
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								polygons.cpp
									
									
									
									
									
								
							| @@ -738,6 +738,24 @@ void prettyline(hyperpoint h1, hyperpoint h2, int col, int lev) { | |||||||
|   drawpolyline(p); |   drawpolyline(p); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | void prettypoly(const vector<hyperpoint>& t, int fillcol, int linecol, int lev) { | ||||||
|  |   prettylinepoints.clear(); | ||||||
|  |   prettypoint(t[0]); | ||||||
|  |   for(int i=0; i<size(t); i++) | ||||||
|  |     prettylinesub(t[i], t[(i+1)%3], lev); | ||||||
|  |   polytodraw p; | ||||||
|  |   auto& pp = p.u.poly; | ||||||
|  |   pp.V = Id; | ||||||
|  |   pp.tab = &prettylinepoints[0]; | ||||||
|  |   pp.cnt = size(prettylinepoints)/3; | ||||||
|  |   pp.minwidth = minwidth_global; | ||||||
|  |   p.col = fillcol; | ||||||
|  |   pp.outline = linecol; | ||||||
|  |   pp.flags = POLY_ISSIDE; | ||||||
|  |   pp.tinf = NULL; | ||||||
|  |   drawpolyline(p); | ||||||
|  |   } | ||||||
|  |    | ||||||
| vector<GLfloat> curvedata; | vector<GLfloat> curvedata; | ||||||
| int curvestart = 0; | int curvestart = 0; | ||||||
| bool keep_curvedata = false; | bool keep_curvedata = false; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue