I want to draw a text with 32 bit transparency on a graphics object. When I try, I only get black color in the result.
If I try to draw a line with the same semitransparent color, it works perfectly.
I have this code:
lBitmap As New Bitmap(32, 32, PixelFormat.Format32bppArgb)
lGraphic As Graphics = Graphics.FromImage(lBitmap)
lGraphi...
Hi,
I am new to Mac OSX, and I wonder if Xcode can generate , for a given C++ source code, the call graph of the program in a visual way.
I also wonder if for each function, and after a run, whether it can also print the %time spent on the function
If so, I would thank really some links with tutorials or info, after googling I did not...
Does anyone know how to trim an image (uiimage or cgimage). By trim I mean programatically cropping to the non-transparent bounds of an image. So if I have the image below:
00111000
00010000
01011110
00000000
it would yield:
011100
001000
101111
...
In Java2D when you use setOpaque I am a little confused on what the true and false does.
For example I know that in Swing Opaque means that when painting Swing wont paint what is behind the component. Or is this backwards? Which one is it?
Thanks
...
I use visual studio in several of my programming classes for c++, but after extensive searching on line i can't seem to find any decent graphics packages that are compatible with the software. i would hate to need to go out and buy Linux (Gnuplot is amazing i know) and this issue is frustrating. Any feedback would be greatly appreciated....
Hello,
I am trying to write some code that that will draw the line which is a tangent between 2 circles. so far i have been able to draw multiple circles, and lines between the centers.
i have a class which stores the values used in drawing the circles (radius, position).
what i need is a method in this class to find all posible tangents...
What I'm specifically grappling with is not just the layout of a graph, but when a user selects a graph node and starts to drag it around the screen area, the line has to constantly be redrawn to reflect what it would look like if the user were to release the node. I suppose this is part of the layout algorithm?
Also some applications ...
I am adding images to a JPanel but the images are getting cut off. I was originally trying BorderLayout but that only worked for one image and adding others added image cut-off. So I switched to other layouts and the best and closest I could get was BoxLayout however that adds a very large cut-off which is not acceptable either.
So basi...
Hi there,
I am relatively new to OpenGL and I am having some issues when I am rendering an image as a texture for a QUAD which is as the same size of the image. Here is my code. I would be very grateful if someone helps me to solve this problem. The image appears way smaller and is squished. (BTW, the image dimensions are 500x375).
gl...
I am writing to Graphics object dynamically and don't know the actual size of final image until output all peaces to the Graphics.
So, I create a large image and create Graphics object from it:
int iWidth = 600;
int iHeight = 2000;
bmpImage = new Bitmap(iWidth, iHeight);
graphics = Graphics....
Hi,
I have the following code to take screenshots of a window:
HDC WinDC;
HDC CopyDC;
HBITMAP hBitmap;
RECT rt;
GetClientRect (hwnd, &rt);
WinDC = GetDC (hwnd);
CopyDC = CreateCompatibleDC (WinDC);
hBitmap = CreateCompatibleBitmap (WinDC,
rt.right - rt.left, //width
rt.bottom - rt.top);//height
SelectObject (CopyDC, hBitmap);
//C...
I want to convert some arbitrary text to a Shape (java.awt.Shape) and then stroke/fill the Shape to draw it. How can I do this?
...
i would like to implement 'drawing modes' (in my own graphics library).
That is drawing with AND, OR, etc
However i am storing colors using floats, each channel between 0 and 1.0
Do i have to first convert each color channel to 0-255 before i can use the AND, OR, etc drawing modes? and then convert back to float (0.0-1.0) ?
Or is there...
I have an NSImage pointer from a platform SDK, and I need to load it into Qt's QImage class. To make things easier, I can create a QImage from a CGImageRef by using QPixmap as an intermediate format, like this:
CGImageRef myImage = // ... get a CGImageRef somehow.
QImage img = QPixmap::fromMacCGImageRef(myImage).toImage();
However, I ...
I have two questions about java.awt.Shape. Suppose I have two Shapes, shape1 and shape2.
How can I serialize them in some way so I can save the information to a file and later recreate it on another computer? (Shape is not Serializable but it does have the getPathIterator() method which seems like you could get the information out but ...
In the NVIDIA README for the Quadro card X driver, there is this comment:
Workstation overlays, stereo visuals,
and the unified back buffer (UBB) are
incompatible with Composite. These
features will be automatically
disabled when Composite is detected
Is there some fundamental X reason why this is so? Why are quadro cards ...
When I drag 'My iPhone App' application's file into iTunes it has proper view. Rounded corners and transparent background.
Then I close iTunes and open it again. Corners are still rounded but... What has happened with the background?
http://www.freeimagehosting.net/uploads/15fee337bc.png
Icon is a project's resource file named 'iTunes...
Hello,
I'd like to implement an old film effect on pictures. Does anyone know a library or even the rare maths involved? I'd like it to cope with red shift for over-exposition and the rest. Even if you don't know the maths or a library, a pointer to any technical doc will be appreciated.
Clarification: I need to write these routines ...
in studying actionscript 3's graphics class, i've come across the undocumented drawRoundRectComplex() method. it's a variant of drawRoundRect() but with 8 parameters, the final four being the diameter of each corner (x, y, width, height, top left, top right, bottom left, bottom right).
//example
var sp:Sprite = new Sprite();
sp.graphic...
I have identified this call as a bottleneck in a high pressure function.
graphics.DrawImage(smallBitmap, x , y);
Is there a faster way to blend small semi transparent bitmaps into a larger semi transparent one?
Example Usage:
XY[] locations = GetLocs();
Bitmap[] bitmaps = GetBmps(); //small images sizes vary approx 30px x 30px...