OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'dart:fletch.ffi'; | 5 import 'dart:dartino.ffi'; |
6 import 'dart:math'; | 6 import 'dart:math'; |
7 | 7 |
8 class FrameBuffer { | 8 class FrameBuffer { |
9 final ForeignPointer _surface; | 9 final ForeignPointer _surface; |
10 | 10 |
11 static ForeignFunction _getFrameBuffer = ForeignLibrary.main.lookup('gfx_creat
e'); | 11 static ForeignFunction _getFrameBuffer = ForeignLibrary.main.lookup('gfx_creat
e'); |
12 static ForeignFunction _getWidth = ForeignLibrary.main.lookup('gfx_width'); | 12 static ForeignFunction _getWidth = ForeignLibrary.main.lookup('gfx_width'); |
13 static ForeignFunction _getHeight = ForeignLibrary.main.lookup('gfx_height'); | 13 static ForeignFunction _getHeight = ForeignLibrary.main.lookup('gfx_height'); |
14 static ForeignFunction _clear = ForeignLibrary.main.lookup('gfx_clear'); | 14 static ForeignFunction _clear = ForeignLibrary.main.lookup('gfx_clear'); |
15 static ForeignFunction _flush = ForeignLibrary.main.lookup('gfx_flush'); | 15 static ForeignFunction _flush = ForeignLibrary.main.lookup('gfx_flush'); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 if (x >= dyabs) { | 58 if (x >= dyabs) { |
59 x -= dyabs; | 59 x -= dyabs; |
60 px += dxsign; | 60 px += dxsign; |
61 } | 61 } |
62 py += dysign; | 62 py += dysign; |
63 drawPixel(px, py, color); | 63 drawPixel(px, py, color); |
64 } | 64 } |
65 } | 65 } |
66 } | 66 } |
67 } | 67 } |
OLD | NEW |