graphics

Android Photography App Double Exposure

大兔子大兔子 提交于 2019-12-11 08:45:31
问题 I would like to create an android app that would combine two photographs together to create something similar to what you would see in a double exposure photograph. Can you give me any ideas on how to do this? 回答1: To get a true double-exposure, all you should need to do is add together the R/G/B values for each pixel with straight addition, with an upper limit of 255 for each component(for 24bpp at least). If it's too bright, you can always reduce it down some afterward. 来源: https:/

How can I compile and run programs using graphics.h in code::blocks?

可紊 提交于 2019-12-11 08:42:11
问题 I am new to code::blocks, so I was wondering how could I compile and run my computer graphics animation programs (those that use graphics.h ) in Code::Blocks. Is this possible with the default installation? Any kind of help would be appreciated. 回答1: This is impossible. You can't use graphics.h without a time machine, so you're better off forgetting about it altogether. This question gets asked about once a week, and the consensus is always the same. The graphics.h header is a proprietary

GameBoy Advance objects not being displayed in correct place when player is moving

老子叫甜甜 提交于 2019-12-11 08:29:52
问题 This might take a while to explain - go grab a snack while you're reading this. I am developing a 2D puzzle platforming game for the Gameboy Advance in C++ (I'm a fairly new programmer). Up until last night, I have been making a phyics engine (just some axis aligned bounding box stuff) which I was testing using a level which was the size of the GBA's screen. However, the final game will demand having a level which is bigger than the size of the screen, and so I have tried to implement a

Save Image from user Drawn PictureBox whose SizeMode=stretch in C# winforms

六眼飞鱼酱① 提交于 2019-12-11 08:18:53
问题 Im drawing an image on picture box which is in stretch mode,I translate the mouse coordinates on the mouse click event by using a function to obtain the real coordinates and draw the image by overriding the on-paint event and using the paint event Graphics. Since the picture box is set to stretch i only obtain a small size image when i try to save the image by using picturebox.DrawtoBitmap Function.The extra parts are padded with Black colour.Please help me out. 回答1: You can try this: using

Draw image into shape?

耗尽温柔 提交于 2019-12-11 08:18:17
问题 I've made an user control that can be used as a circle/square/triangle shape, the control can draw a border (outer) and fill what its inside that border (inner) To understand it: The border is the black, and the inner is the red. Well, now I would like to add a feature in my control to fill the inner of the shape using an image. but when I try to fill only that space using an image, the outside area of the shape is also drawn: I'm not any expert using GDI+, how I can fix this? I need to do

Calling a Method in another Form C#

有些话、适合烂在心里 提交于 2019-12-11 08:09:46
问题 I know that this a very common topic and I have been searching for some time for a solution. Again I am working on a CHIP8 emulator and I am trying to create a separate form to process the graphics. I now have two forms, Form1 and graphics. What I would like to do is call the "draw" method in graphics from Form1. In Form1 I have the following code... This is the error that I am getting: Error 4 'System.Windows.Forms.Form' does not contain a definition for 'Draw' and no extension method 'Draw'

Trying to Create 3x3x3 Cube but created 4x4x4 instead in OpenGL

会有一股神秘感。 提交于 2019-12-11 08:05:09
问题 I am trying to create a 3d rubiks cube, however the dimensions are not aligning with the dimensions set. When I set the dimensions to 3 and create a 3x3x3 cube, I end up creating a 4x4x4 cube. However, when I set the dimension to 2, it creates a 3x3x3 cube and when the dimension is set to 1, a 1x1x1 cube is created. Can someone help with this? Thanks! Code for cube: #imports dim = 3 cube = [[['#' for c in range(dim)] for c in range(dim)] for r in range(dim)] for i in range(dim): for j in

what is Alternative of Paint and repaint function?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 07:52:12
问题 Is there any function which can be replaced with paint() and repaint() in java. I have a scenario. There is a triangle (Triangle 1) . when user will click in triangle another triangle (Triangle 2) will appear and 1st (Triangle 1) will be removed from screen. (coded using JFrame , paint() and repaint() ) I have achieved it so far. but problem is when I minimize or change size of window with mouse the output window, it just paint again Triangle 1 rather than Triangle 2 . OR Clear the whole

Implementing graphics pipeline

浪子不回头ぞ 提交于 2019-12-11 07:49:21
问题 Following on from this post from yesterday. The situation is the same as in the original post: I'm implementing my own Graphics pipeline, odd issue with transforms. However, I now believe that the issue isn't with the perspective projection and is a larger issue than just that. Right now the pipeline only has three stages, the first transforms individual vertices using the model and projection matrices. The next assembles these into the primitives, which are finally rendered by the rasteriser

Java graphic library for multicoloured text

旧城冷巷雨未停 提交于 2019-12-11 07:38:42
问题 I would like to know the recommended library or procedure for dealing with multi-coloured text within Java. My current usage of java.awt.Graphics, while function, appears to be a bit more complex than necessary. The main issue involves the frequent change of colour, creating a new java.awt.Colour() object whenever a new colour is needed (and it's usually not one of the predefined values.) I already keep track of the previously used rgb value, but it's possible that the colour can potentially