41 lines
		
	
	
		
			934 B
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			934 B
		
	
	
	
		
			Python
		
	
	
	
| import cairo
 | |
| from .page import Page
 | |
| 
 | |
| class DST810(Page):
 | |
| 
 | |
|     # DBT, STW, Log, WTemp
 | |
| 
 | |
|     def draw(self, ctx):
 | |
| 
 | |
|         # Layout
 | |
|         ctx.rectangle(0, 105, 400, 3)
 | |
|         ctx.rectangle(0, 195, 400, 3)
 | |
|         ctx.rectangle(200, 195, 3, 75)
 | |
|         ctx.fill()
 | |
| 
 | |
|         ctx.select_font_face("Ubuntu", cairo.FontSlant.NORMAL, cairo.FontWeight.BOLD)
 | |
|         ctx.set_font_size(40) 
 | |
| 
 | |
|         # titel
 | |
|         ctx.move_to(20, 55)
 | |
|         ctx.show_text("Depth")
 | |
|         ctx.move_to(20, 145)
 | |
|         ctx.show_text("Speed")
 | |
|         ctx.move_to(20, 220)
 | |
|         ctx.show_text("Log")
 | |
|         ctx.move_to(220, 220)
 | |
|         ctx.show_text("Temp")
 | |
| 
 | |
|         # Einheiten
 | |
|         ctx.set_font_size(24) 
 | |
|         ctx.move_to(20, 90)
 | |
|         ctx.show_text("m")
 | |
| 
 | |
|         # Meßwerte
 | |
|         ctx.select_font_face("DSEG7 Classic")
 | |
|         ctx.set_font_size(60)
 | |
|         
 | |
|         ctx.move_to(180, 90)
 | |
|         ctx.show_text("m")
 | |
|         ctx.set_font_size(40)
 |