transparency

Output a Java window as a webcam stream

核能气质少年 提交于 2021-02-10 03:56:07
问题 I would like to write a program perferably in Java that can display animated overlays on a screen. The screen will then be broadcast streamed over the internet using a separate program called x-split. A good way to do this would be to create a transparent window in java which will display animated files (with transparancy) and the output of this window (Its display) should ideally appear in the webcam device list so it can be easily picked up by x-split which will allow it to be arranged

Pygame collision detection, transparent border

半世苍凉 提交于 2021-02-08 10:52:18
问题 For my pygame project, I must detect collision betweeen various .png image that move on the screen. I have put the image inside sprite, and the sprite inside group, then I use this : pygame.sprite.spritecollide(perso, zombie_group, False) However, sometime, my image don't touch, but pygame detect a collision... This is due to the fact that my images are png with transparent borders. The transparent border collide, and pygame detect this :( Any idea to stop the transparent border from

Pygame collision detection, transparent border

北慕城南 提交于 2021-02-08 10:50:38
问题 For my pygame project, I must detect collision betweeen various .png image that move on the screen. I have put the image inside sprite, and the sprite inside group, then I use this : pygame.sprite.spritecollide(perso, zombie_group, False) However, sometime, my image don't touch, but pygame detect a collision... This is due to the fact that my images are png with transparent borders. The transparent border collide, and pygame detect this :( Any idea to stop the transparent border from

Pygame collision detection, transparent border

早过忘川 提交于 2021-02-08 10:49:45
问题 For my pygame project, I must detect collision betweeen various .png image that move on the screen. I have put the image inside sprite, and the sprite inside group, then I use this : pygame.sprite.spritecollide(perso, zombie_group, False) However, sometime, my image don't touch, but pygame detect a collision... This is due to the fact that my images are png with transparent borders. The transparent border collide, and pygame detect this :( Any idea to stop the transparent border from

How to avoid transparency overlap using OpenGL?

。_饼干妹妹 提交于 2021-02-07 13:42:10
问题 I am working on a handwriting application on iOS. I found the sample project "GLPaint" from iOS documentation which is implemented by OpenGL ES, and I did something modification on it. I track the touch points and calculate the curves between the points and draw particle images alone the curve to make it looks like where the finger passby. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE,

How to avoid transparency overlap using OpenGL?

旧城冷巷雨未停 提交于 2021-02-07 13:41:20
问题 I am working on a handwriting application on iOS. I found the sample project "GLPaint" from iOS documentation which is implemented by OpenGL ES, and I did something modification on it. I track the touch points and calculate the curves between the points and draw particle images alone the curve to make it looks like where the finger passby. glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE,

How to create a transparent bitmap in Direct2D

女生的网名这么多〃 提交于 2021-02-07 08:22:35
问题 I need to create a transparent bitmap using Direct2D and draw, by using my device context, on it. ID2D1DeviceContext1* d2dContext = ... ID2D1Bitmap* pBitmap; d2dContext->CreateBitmap( bitmapSize, nullptr, 0, D2D1::BitmapProperties1( D2D1_BITMAP_OPTIONS_TARGET, D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), dpiX, dpiY), &pBitmap); d2dContext->BeginDraw(); d2dContext->SetTarget(pBitmap); d2dContext->Clear(D2D1::ColorF(0, 0)); d2dContext->DrawLine(...); hr =

How to create a transparent bitmap in Direct2D

我是研究僧i 提交于 2021-02-07 08:22:20
问题 I need to create a transparent bitmap using Direct2D and draw, by using my device context, on it. ID2D1DeviceContext1* d2dContext = ... ID2D1Bitmap* pBitmap; d2dContext->CreateBitmap( bitmapSize, nullptr, 0, D2D1::BitmapProperties1( D2D1_BITMAP_OPTIONS_TARGET, D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), dpiX, dpiY), &pBitmap); d2dContext->BeginDraw(); d2dContext->SetTarget(pBitmap); d2dContext->Clear(D2D1::ColorF(0, 0)); d2dContext->DrawLine(...); hr =

Have a transparent background in a plot exported from Octave

心不动则不痛 提交于 2021-02-05 12:21:02
问题 I am using portable Octave 5.1.0 under Win 10. I mean to write a plot to png with transparent background. Disclaimer: This question is similar to the two linked below. I opted asking the present different question since I am adding further relevant information (by the same token, question #2 below was not a dupe of #1). This is what I found: print(gcf,'-dpngalpha', 'myplot.png'); , suggested in Saving a plot in Octave with transparent background, does not work for me. It is remarkable that I

how to make circular surface in pygame

戏子无情 提交于 2021-02-05 09:23:06
问题 I need to create a surface that has a bounding circle. Anything drawn on that surface should not be visible outside that bounding circle. I've tried using masks, subsurfaces, srcalpha, etc., but nothing seems to work. My attempt: w = ss.get_width () h = ss.get_height () TRANSPARENT = (255, 255, 255, 0) OPAQUE = ( 0, 0, 0, 225) crop = pygame.Surface ((w, h), pygame.SRCALPHA, ss) crop.fill (TRANSPARENT) c = round (w / 2), round (h / 2) r = 1 pygame.gfxdraw. aacircle (crop, *c, r, OPAQUE) pygame