Questions tagged [blit]

BLock Image Transfer - Involves copying one bitmap onto another using a raster operator.

303 questions
3
votes
1 answer

Pygame - How do I blit an image but change its color?

I have a program for a random flag generator. I have made a white "background" for a flag, and different symbols etc. which are white. The reason they're white is so I can color it using an RGB value. The problem is, I'm not sure how to do that(if…
Potensa
  • 33
  • 1
  • 3
3
votes
1 answer

Python - blit with subplots only plotting last subplots

I am trying to plot multiple subplots in real-time in my python application. Ideally, I should also be able to plot multiple lines in each subplot, but for simplicity here I assume one line per subplot. In order to do so efficiently (I am looking…
jappoz92
  • 33
  • 1
  • 4
3
votes
1 answer

Python, QT and matplotlib scatter plots with blitting

I am trying to animate a scatter plot (it needs to be a scatter plot as I want to vary the circle sizes). I have gotten the matplotlib documentation tutorial matplotlib documentation tutorial to work in my PyQT application, but would like to…
fp1991
  • 140
  • 1
  • 10
3
votes
1 answer

Python matplotlib blit and update a text

I know that this topic is often popping out, but after many tries, searches and give-ups, I am bringing it back to you. I have a class, which contains a matplotlib figure. In this figure, I want a text, and when the user hits some key, the text is…
Etienne
  • 67
  • 2
  • 6
3
votes
2 answers

Pygame blit part of an image(background image)

I have a pygame menu where i have drawn some buttons, which represent the level difficulty of my game. For user convenience, i have made a sprite which indicates which level-button is selected(think of it as a light green frame around the button).…
M.Achilles
  • 93
  • 1
  • 2
  • 10
3
votes
1 answer

pygame - updating score box

I'm learning to use pygame and I have some problems with rendering text. The simplified code I'm working with is like this: import pygame sizex =200; sizey =200 pygame.init() clock = pygame.time.Clock() screen =…
David Sousa
  • 383
  • 2
  • 13
3
votes
0 answers

Matplotlib: Drag n Drop and blitting

I have created a FigureCanvaswhich allows drag and drop on all Textinstances. This works great for text within the axes, but for text outside the axes (such s axis labels), when the text is being picked, it leaves behind a 'trail' of text where ever…
jramm
  • 6,415
  • 4
  • 34
  • 73
3
votes
1 answer

Rendering Motionless Images in SDL

I am currently learning SDL and I am trying to create a Pacman game. I'm trying to take it in steps so as not to get bogged down with massive amounts of code. So far I have created a blank window and rendered a Pacman image onto it. I am able to…
wgrenard
  • 187
  • 12
3
votes
1 answer

Windows: Low level software rendering to a window

I've heard about various methods of rendering to a Window, but these all involve using some thing such as GDI+, DirectX, OpenGL, or something else. How do these libraries work, and how do they get pixels into a Window? Just out of curiosity, how…
Name McChange
  • 2,750
  • 5
  • 27
  • 46
3
votes
1 answer

XNA 4 - Texture clone

I need to copy content of one texture2d to another (both stored in VRAM)? Is this even possible without using RTT or any additional RAM-VRAM transfers? Just pure BLIT between two textures in VRAM. Thanks in advance! I am not able to figure it out.
Petr Kalandra
  • 335
  • 2
  • 7
2
votes
1 answer

python pygame blit. Getting an image to display

I'm trying to get my webcam to show video through pygame. Here is the code: # import the relevant libraries import time import pygame import pygame.camera from pygame.locals import * # this is where one sets how long the script # sleeps for, between…
Avovk
  • 527
  • 1
  • 5
  • 15
2
votes
1 answer

SDL : blitting time optimization

I'm using SDL in windowed mode. Given a large sprite, say 1024 x 640, is it faster to blit the entire image into severals small tiles, say 32 x 32 px, than to blit the whole image at once ? I have to blit a background on the screen (1024 * 640) in…
Arnaud G
  • 139
  • 1
  • 1
  • 4
2
votes
2 answers

Image not printing to screen using 'Blit' Pygame

I am trying to make an Undertale like game in python - However I have a problem. When I try to 'blit' an image to the screen it doesn't show. I am 'blitting' a heart and I have rescaled it to an appropriate size in a 3rd party program. import pygame…
2
votes
1 answer

How to draw object on screen?

I want to display an each object of the class "Obstacle" on the screen. The objects are stored in the list obstacle_list. I dont get an error message, but the window just freezes and no objects are displayed on the screen. I think the problem must…
Doritito
  • 77
  • 7
2
votes
1 answer

pygame : Trying to use the "area" tag in Surface.blit()

I'm trying to figure out how to use the area argument one can pass when blitting a pygame surface. Picture a isometric rpg view where the camera is following the character. My code is working fine as long as my player stays in the starting screen…
Zelus
  • 23
  • 2
1 2
3
20 21