I want to join some surfaces to a new big surface with alpha cannel, I want
the new surface has same pixels(inclue r,g,b and alpha value) as the pixels
on the source surfaces.
my code as follow:
surf = pygame.Surface( (200,200))
surf.blit(surf1 , (0,0))
surf.blit(surf2 , (0,100))
......
but these codes can't copy alpha value to the new surface.how can I deal
with it? 1 2160
flyaflya wrote: I want to join some surfaces to a new big surface with alpha cannel, I want the new surface has same pixels(inclue r,g,b and alpha value) as the pixels on the source surfaces. my code as follow:
surf = pygame.Surface( (200,200)) surf.blit(surf1 , (0,0)) surf.blit(surf2 , (0,100)) .....
but these codes can't copy alpha value to the new surface.how can I deal with it?
Try the pygame mailing list or irc channel. http://www.pygame.org/info.shtml This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Askari |
last post by:
(Help for Pygame module)
Hi,
How I can make a "fadeout text"(alpha at 255,254,253...0) on a surface
and my surface's background must be transparatly?
Note : I can do a fadeout but with a background on the surface's text but
I wan't a tranparently background.
Example (don't work) :
|
by: J. W. McCall |
last post by:
I'm not sure if this is off-topic, since it doesn't deal with Python
itself, but here goes:
I'm messing around with writing a simple "game" where the player (a
crudely drawn smiley face) moves by rotating and moving back or forward
(think Resident Evil, but from an always-above view). After much
hacking, I have it working where left and right rotate the player sprite
and up always moves the sprite whichever direction it's facing, while...
|
by: kishkin |
last post by:
Hello everybody!
I just want to make window transparent. ;) At this moment I've found
only ideas of taking screenshots to make background... Anything else?
Thanks for help!
|
by: Brian L. Troutwine |
last post by:
I've recently begun to teach myself pygame by making a bunch of small
toys. My current toy is cellular automata displayer and I've gotten a
bit stuck on the displaying bit. (If automata isn't the plural of
automaton please forgive me.) The current automata are only binary and
are calculated using 2D Numeric arrays. It had been my assumption that
once the automata was calculated I could then multiply the entire
array by 255 to get a nice...
|
by: liuliuliu |
last post by:
hi -- sorry if this is trivial -- but how do you make a screenshot of a
pygame display? i have a surface which is basically the entire visible
screen -- how do you write this surface as an image file during
specific events in the script execution? image format doesnt matter.
thanks! christine
| |
by: dynamo |
last post by:
Hi guys i have come again with more problems.This time it has to do with pygame.The following code does not give any error messages but it does not do what it is supposed to do either.the code is a bit long but it's straightforward.Please help
import pygame
from pygame.locals import *
pygame.init()
screen=pygame.display.set_mode((900,900))
class Hero(pygame.sprite.Sprite):
def __init__(self):
...
|
by: defn noob |
last post by:
Im using PyGame to draw images of graphs and trees. Howver right now i
am looping using:
while 1:
for event in pygame.event.get():
if event.type == pygame.QUIT: sys.exit()
screen.fill(screencolor)
pygame.draw.circle(screen, linecolor, (500, 20), 12, 0)
|
by: Clay Hobbs |
last post by:
On Sun, 2008-10-05 at 14:16 -0400, Mike C. Fletcher wrote:
I'm using wxPython. My real problem is that everything flashes when it
moves. I thought the way to fix this was to make a double-buffered
hardware surface, but I may be wrong. Thank you for the help so far,
--Ratfink
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |