BLock Image Transfer - Involves copying one bitmap onto another using a raster operator.
Questions tagged [blit]
303 questions
2
votes
1 answer
How to blit numbers in pygame?
Currently, I am working on a game in which you are asked a mathematical question such as 2 + 1 and numbers will fall from the top of the screen. The player has to click the right answer before it falls below the screen. However, I don't want to…

Abdulrahman
- 111
- 9
2
votes
1 answer
pygame surface.blit(bg,pos,pos) Vs. surface.blit(bg,pos), do you understand this?
Reading the pygame tutorial here , you'll find this example: (arrows mine)
for o in objects:
screen.blit(background, o.pos, o.pos) #<---
for o in objects:
o.move()
screen.blit(o.image, o.pos) #<---`
Reading the pygame documentation for…

Michael Meanswell
- 51
- 6
2
votes
1 answer
How to align the text in textrect.center to the left?
I have some code that will blit text to the screen, but I can only align it to the, but I want it on the left.
Here is what i have right now:
smallText = pygame.font.Font('freesansbold.ttf', 25)
textSurf, textRect = text_objects(coins, smallText,…

Krystian O
- 35
- 1
- 6
2
votes
2 answers
Matplotlib animation with blit -- how to update plot title?
I use matplotlib to animate a plot, by copying the background and blitting:
f = Figure(tight_layout=True)
canvas = FigureCanvasTkAgg(f, master=pframe)
canvas.get_tk_widget().pack()
ax = f.add_subplot(111)
# Set inial plot title
title =…

Eugen Epure
- 21
- 1
- 3
2
votes
1 answer
Matplotlib: animation for audio player cursor (sliding vertical line) with blitting looks broken on WxPython
I am building up a project that requires an audio player for very specific purposes. I'm currently using WxPython, Matplotlib and PyAudio packages. I'm also using Matplotlib's WXAgg backend (backend_wxagg).
The basic idea is very simple: the audio…

Rui Pimentel
- 584
- 1
- 5
- 16
2
votes
1 answer
Will Pygame blit sprites with a rect outside the display
I'm currently working on a space exploration game in 2D top view. I have quite a few planets and since the map span is much greater than the display I end up with a lot of planet sprites lying outside the display area. At the moment I assume Pygame…

Sorade
- 915
- 1
- 14
- 29
2
votes
1 answer
Pygame screen won't blit
I have an Agar.io like test game where the square player touches the "bit"s and grows. The problem is the bit generation. The bit generates every second and has its own surface. But, the program will not blit the bit (no pun intended) into the…

ooransoy
- 785
- 5
- 10
- 25
2
votes
1 answer
Windows Store App - WriteableBitmap , blit method
Alright , i am trying to merge two images(superimpose one image on top of another) using writeablebitmapex library's blit method. And after applying the blit all i am getting is a transparent image with no content.
I would like to superimpose the…

Mohammed Aamir K
- 311
- 5
- 17
2
votes
1 answer
Cannot delete matplotlib.animation.FuncAnimation objects
EDIT/TL;DR: It looks like there is a matplotlib.backends.backend_qt4.TimerQT object that hold a reference to my FuncAnimation object. How can I remove it to free the FuncAnimation object?
1 - A little context
I'm trying to animate a plot generated…

Cyrille
- 13,905
- 2
- 22
- 41
2
votes
2 answers
Sprite-Sheet BLIT with HTML 5 Canvas?
Looking for an example of someone doing a a sprite sheet BLIT with javascript and the HTML 5 Canvas tag.
I've been looking at Processing.js a bit, but I haven't found a clear cut example of how to do it there.

j03m
- 5,195
- 4
- 46
- 50
2
votes
2 answers
fastest way to blit image buffer into an xy offset of another buffer in C++ on amd64 architecture
I have image buffers of an arbitrary size that I copy into equal-sized or larger buffers at an x,y offset. The colorspace is BGRA. My current copy method is:
void render(guint8* src, guint8* dest, uint src_width, uint src_height, uint dest_x, uint…

mpr
- 3,250
- 26
- 44
2
votes
2 answers
How to wrap blit around screen edge?
Given an image, how could one "wrap" that image around the screen?
For example, if you set the image's rect style object below the screen edge- the invisible half would blit onto the top of the screen.
imageRect.top=800 #Below screen…

user2592835
- 1,547
- 5
- 18
- 26
2
votes
2 answers
How to make a translucent image in pygame dynamically
I'm working on custom gui components within pygame, and when making the slider component, I am giving the slider a Draw(parentSurface) function which draws the slider on to the parent surface at it's stored location.
Now this works, but the slider…

user3290860
- 23
- 2
2
votes
1 answer
Overlay a smaller image over larger image using WriteableBitmapEx Windows Phone
In my hidden object game, I want to mark the object with a circle image when found with the following code where AnsX1, AnsX2, AnsY1, an AnsY2 is the pixel coordinates of the object location. The circle image should be resized according to the…

PutraKg
- 2,226
- 3
- 31
- 60
2
votes
1 answer
time.sleep() required to keep QThread responsive?
First, I am new to Python. I am a long-time MatLab user (engineer, not computer scientist) and I am beginning the process of attempting to work Python, NumPy, SciPy, etc. into my workflow. So, please excuse my obvious ignorance of what is a…

ph0t0n
- 735
- 1
- 10
- 24