Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
		
							parent
							
								
									4e04c105d5
								
							
						
					
					
						commit
						c7358eca49
					
				
							
								
								
									
										15
									
								
								js/x11/core/examples/smoketest/cleararea.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								js/x11/core/examples/smoketest/cleararea.js
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| var x11 = require('../../lib'); | ||||
| var Window = require('./wndwrap'); | ||||
| 
 | ||||
| x11.createClient(function(err, display) { | ||||
|     var X = display.client; | ||||
|     var w = new Window(X, 0, 0, 700, 500); | ||||
|     w.map(); | ||||
| 
 | ||||
|     w.on('expose', function() { | ||||
|       var gc = X.AllocID(); | ||||
|       X.CreateGC(gc, w.id, { foreground: w.black, background: w.white }); | ||||
|       X.PolyFillRectangle(w.id, gc, [50, 50, 600, 400]); | ||||
|       X.ClearArea(w.id, 0, 0, 300, 300, 0); | ||||
|     }); | ||||
| }); | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user