|
Hi!
I having a bit of trouble with drawing an arc and I hope somebody
here could give me a hint.
What I want is to draw an arc given the following parameters: a
bounding box (x1,y1,x2,y2) and a start- and end-angle.
The center point of the arc is the same as the center point of
the bounding box, and the start- and end-angle determines how
long the arc should be.
In example, a square bounding box and a start-angle of 0 and end-
angle of 360 will give a perfect circle (the inscribed circle of
the bounding box), while a "squashed" box and angles of 110 - 200
will give a quarter of an equally squashed circle (starting at 110
degrees).
Moreover, I would like to draw filled arcs (like a pie slice)
as well.
Can anybody give me a hint or an algorithm to look at? I've looked
at the normal Bresenham circle algo and think it should be possible
to adapt this, but I've been unsuccessfull so far.
WinCE Does not support MFC's ARC/Pie .
|
|
|
|
|
Hi!
i would like know about the possibility of programming 3d graphs in vb (6 if is possible) without use directx, i know what is possible in OpenGl, but i not know a good about this theme, someboy can tell me where i can found more information?, thanks very much for your help.
|
|
|
|
|
haggenx wrote: programming 3d graphs in vb (6 if is possible) without use directx
I have never attempted it, but you can download the vb sources from Nehe and "try" them to see if they match what ever level VB you are attempting to use. http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=05[^] (scroll to the bottom for all the sources for the same project)
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
|
In one of my project i have to create the sketch of human face by combining diffrent parts of the face but i have n idea how it can be done please guide me in detail
mresh
|
|
|
|
|
My first thought would be draw the sketches of the face parts on paper, cut them out with a scissors,
and arrange complete faces by moving around the pieces of paper on your desk/table.
But I suppose you want to do it programatically. You could do something similar.
You may have trouble finding volunteers here to do this for you (guide you in detail).
If you have a plan and break it down into steps and have trouble with certain specific
steps, you'll probably get much more helpful response here
Good luck!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
mresh wrote: In one of my project i have to create the sketch of human face by combining diffrent parts of the face but i have n idea how it can be done please guide me in detail
run down to your nearest art store, get a book on drawing the human face. This breaks down the face into percentages of the head. Do the same in your program.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
How many of you think this will work. I am skeptical, but intrigued just the same.
New ATI FireGL boards[^]
Supposedly they have an auto-tuning driver that tunes performance based on how you are using it at the time. It sounds nice, and looks nice on paper.... but I am curious if it would actually work consistently well. I imagine you could take any test case and it would work, but a full application with variety? would it have to be constantly rebalancing and retuning? would it just take its best shot, make a few tweaks and give up?
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Probably not a lot different that what peephole optimizing compilers do with ordinary code. That technology is pretty mature.
Mongkut to a Christian missionary friend: "What you teach us to do is admirable, but what you teach us to believe is foolish" .
|
|
|
|
|
Hey friends.....
How to fill the area Between two co-centric Circle/Arc.
we have co-ordinate of outer Arc/Circle and Inner Arc/Circle . how to colored this area with spwcific COLOR.
while using CRgn, floodFill , we require RECT but i want to Fill area between two co-centric ARC
Waiting for reply
Thanks in advance...
|
|
|
|
|
Try creating a single path, like the outline of a C that is almost closed on itself,
then fill it.
If necessary, use two such C paths, one a mirrored image of the other.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Dear All Hi,
I have a dialog on which there is an image. Now I want to place another smaller image on the previous image. This new image should be semi transparent i-e see through. I want to ask u people that how can I make this new smaller image (which I have placed on the previous image) semi transparent? So that the image beneath this new smaller image can be seen through it.
Thanks in advance.
Yasir
|
|
|
|
|
One way is to use the GDI AlphaBlend() API to draw the semi-transparent image.
Another way is to use GDI+.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
The GDI+ code that will make the image semi-transparent is to create a custom color matrix. This topic is too lengthy to get into specifics but here is some sample code the will get you started:
//Define a color matrix that has 60% transparency
//The value 0.6 in row 4, column 4 specifies the alpha
float[][] matrixItems = { new float[] {1,0,0,0,0},
new float[] {0,1,0,0,0},
new float[] {0,0,1,0,0},
new float[] {0,0,0,0.6f,0},
new float[] {0,0,0,0,1}};
ColorMatrix colorMatrix = new ColorMatrix(matrixItems);
//Now we need an ImageAttributes object
ImageAtttributes imageAtt = new ImageAttributes();
imageAtt.SetColorMatrix(colorMatrix,
ColorMatrixFlag.Default, COlorAdjustType.Bitmap);
//Here, we will now draw the image using the imageAtt
//You will need to have a graphics object created. I am
//using a graphics object with a var name of "g"
g.DrawImage(
myAlphaBitmap, //the image to be made semi-transparent
new Rectangle(10,10,10,10), //destination bmp size
0.0f, //start drawing from the XPos
0.0f, //start drawing from the YPos
myAlphaBitmap.Width, //draw all of the original width
myAlphaBitmap.Height, //draw all of the original height
GraphicsUnit.Pixel, //specify the graphics unit
imageAtt); //use our custom imageAtt
//release system resources
imageAtt.Dispose();
//End of code----------------------------
Hopefully this will get you started in the right direction!
Cheers!
Richard
may your code be error free
|
|
|
|
|
Hi All,
How to calculate the total number of vertical lines and the total number of horizontal lines in a .png file using VC++
|
|
|
|
|
If all else fails, you can read it using GDI+. However, I'd imagine the width and height are part of the metadata you could read with some research into the file format.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
this may help you[^]
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Can I convert maya binary file to .obj file...If so please tell me how can I do that.I only have maya learning edition.
thanks in advance
|
|
|
|
|
What are you hoping to achieve ? An obj file is a code file, and a maya file is surely not code, but data ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
In my project I have to load an .obj file.I have only .obj file loader. But the original model is in maya binary file. So, I want to convert the maya binary file to .obj..
|
|
|
|
|
Christian Graus wrote: An obj file is a code file
There's an early graphics file format that, unfortunately, is also .obj for "3d Object". If I remember right, it's a text file that defines vertices, polygons, etc.
Mongkut to a Christian missionary friend: "What you teach us to do is admirable, but what you teach us to believe is foolish" .
|
|
|
|
|
Hello,
I'm developing an application windows CE(by using C# in VS2003).
I have Form1 in which i have 2 panels: panel1,panel2
In panel1, I have a textBox1 and a button "oK"
In panel2, I have only a textBox2.
I write this code in order to have the cursor in the textBox1(resp textBox2) when panel1(resp panel2) is shown:
public Form1()
{
panel2.Hide();
panel1.Show();
textBox1.Focus();
}
private void OK_Click(object sender, System.EventArgs e)
{
this.panel1.Hide();
this.panel2.Show();
textBox2.Focus();
}
But I have seen only the cursor in textBox1 of panel1.
Thank you
|
|
|
|
|
You may get a better response on the C# board[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi there
I would like to use a expanding panel on my page which looks just like the tabs at the top of mozilla or IE7, except that it runs down the page instead of across the top, and when a tab is selected it opens left to right, as if coming out of the left side of the screen. Preferably when it opens it should give a similar effect to the AJAX collapsable panel with a fade smooth fade in and out, or for those of you who have seen the XBOX360 interfaces tabbing system, then similar to that. The AJAX panel unfortunately only moves up and down. Does anyone have any code which they have used before to accomplish something similar or have a link to a tool which can provide this feature???
Any help would be greatly appreciated as I am out of ideas of where to look, or what to search for.
Thanks...
Dev
|
|
|
|
|
I´m new here, so I want to ask you guys if you could tell me how to (or point me in the right direction) composite my logo (with transparency) over live video. Kind of like what networks do when they place their logos over their signal. I am good at VB6, and am learning VB.NET. Should I do it in VC++?
Please help me, I am very interested in graphics programming.
jondiego
|
|
|
|
|