Comments (3)
Original comment by René Dudfield (Bitbucket: illume, GitHub: illume):
Seems fixed in the repository.
from pygame.
Original comment by René Dudfield (Bitbucket: illume, GitHub: illume):
Here is an easier to run example, that also shows the problem is to do with the screen surface and the draw routine.
import pygame
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode( (200, 200), 0, 32 )
surf = screen
print "screen info", surf.get_masks(), surf.get_shifts(), surf.get_pitch(), surf.get_losses()
surf = pygame.Surface( (200,200), 0, 32)
print "surface info", surf.get_masks(), surf.get_shifts(), surf.get_pitch(), surf.get_losses()
surf.fill((0,0,0,255))
pygame.draw.line( surf, (255, 255, 255), (0,0), (100, 100) )
pygame.draw.aaline( surf, (255, 255, 255), (0,100), (100, 200) )
screen.blit(surf, (0,0))
going = True
while going:
events = pygame.event.get()
if QUIT in [e.type for e in events]:
going = False
pygame.display.update()
On OSX Lion 64bit python it prints:
screen info (65280, 16711680, 4278190080, 0) (8, 16, 24, 0) 800 (0, 0, 0, 8)
surface info (16711680, 65280, 255, 0) (16, 8, 0, 0) 800 (0, 0, 0, 8)
So we can see that the screen surface, and a normal software surface is laid out differently. So there must be an issue with the draw.aaline method and this type of memory layout.
The example above shows a work around, of blitting to a normal surface and then blitting that surface to the screen. This works as expected and gives a white line, not a yellow one.
from pygame.
I'm getting the same problem with version 1.9.3.
from pygame.
Related Issues (20)
- pygame 2.5.0 file is not a Windows BMP file
- Problem in converting a simple pygame file into apk using buildozer
- Snake.go HOT 2
- Add clear() function to pygame.scrap (also, rename?) HOT 1
- Downlaoding Pygame Not Working HOT 2
- I keep getting this error and my pygame doesn't run, need help
- improper KEYDOWN events
- Can't get title bar to show when having a large screen size HOT 1
- Bug about pygame.draw.polygon() HOT 9
- Pygame Keyboard Event Handling Not Working with ALE Environment in WSL 2
- KEYDOWN监听不到字母 HOT 1
- I get an error when I log out of my game: (line 145 pygame.display.update(); pygame.error: video system not initialized) HOT 1
- Some SVGs don't display correctly HOT 2
- Segfault when _sdl2.Renderer gets garbage collected after window has been destroyed
- Pygame.mixer module not available? HOT 1
- Program causing Mac OS to freeze HOT 3
- `set_mode()` wont change the graphics mode the second time when OPENGL flag is used HOT 6
- litta
- Pygame fails to compile with GCC-14 HOT 4
- Deload a pygame.image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygame.