File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ class ChaosRenderer {
34
34
}
35
35
36
36
func drawPoint( _ x: Double , _ y: Double , _ color: PixelData ) -> ( Bool ) {
37
- if x * 250 < Double ( Int . max) && x * 250 > Double ( Int . min) && y * 250 < Double ( Int . max) && y * 250 > Double ( Int . min) {
38
- let x = Int ( x * 125 ) + width/ 2
39
- let y = Int ( y * 125 ) + height/ 2
37
+ if x * 500 < Double ( Int . max) && x * 500 > Double ( Int . min) && y * 500 < Double ( Int . max) && y * 500 > Double ( Int . min) {
38
+ let x = Int ( x * 500 ) + width/ 2
39
+ let y = Int ( y * 500 ) + height/ 2
40
40
41
41
if x > 0 && x < width && y > 0 && y < height {
42
42
frameBuffer [ y * width + x] = color
@@ -47,7 +47,7 @@ class ChaosRenderer {
47
47
}
48
48
49
49
func render( _ cgContext: CGContext , _ rect: CGRect ) {
50
- cgContext. setShouldAntialias ( false )
50
+ cgContext. setShouldAntialias ( true )
51
51
52
52
//create CGImage from frame buffer
53
53
let img = createImageFromPixels ( pixels: frameBuffer, width: width, height: height)
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ final class ChaosSaverView: ScreenSaverView {
24
24
25
25
//renderer = ChaosRenderer(Int(self.bounds.width), Int(self.bounds.height))
26
26
//Maybe need to set frame buffer size depending on if it's a preview
27
- renderer = ChaosRenderer ( 1024 , 576 )
27
+ renderer = ChaosRenderer ( 1920 , 1080 ) //( 1024, 576)
28
28
}
29
29
30
30
override func animateOneFrame( ) {
You can’t perform that action at this time.
0 commit comments