|
Anyone knows if a directx window can be transparent and a click-thru ?
like this example
|
|
|
|
|
Greetings,
I'm trying to determine the best way to get a polygon from a set of points. The points are not in any particularly useful order (they are the endpoints of individual lines that fill the polygon in question). How can I easily take such a set of points and figure out the vertices of a polygon from them? The polygons may have gaps inside of them. Any ideas?
Thanks,
Will
|
|
|
|
|
so you need the hull or the convex hull of some objects? That is pretty straightforward, just google for those terms.
BTW: it is an algorithmic problem, not really a graphic one.
|
|
|
|
|
Hello all,
first of all im sorry if its the wrong place for this question.
I am trying to decaptcha the following captcha:
[IMG]http://i26.tinypic.com/wrazt.png[/IMG]
what i am trying to do is removing the letters from the rest of the image. I am using Matlab atm but will do it in C# i think. its where i stucked, since all texture on background and letters are same, i can't find a proper way of doing it.
Im looking for your suggestions, thanks in advance
ps: its not a hacking project or so, never will be used for spamming or other purposes.
|
|
|
|
|
|
Hi,
I was looking at Andrew Rissing's project AVID and was impressed. His code creates meshes from spheres and cylinders. (Ball and Stick class). I,ve done a small amount of 3d (under borland) but nothing under .net. Can anyone point me to an example of how to load a mesh from a TIN? I'm not using an *.x file. For example I would like to create a TinSurface class where I have a list of vectors (x,y,z) and a list of triangles (v1, v2, v3). Ideally I would like a drape a bitmap (green grass, brown dirt etc) but this can wait. ( I guess I could draw some funny looking trees with Andrew's classes while I'm at it !)
I'm doing volume calcs between 2 surfaces and would like to graphically show how the surfaces intersect (for cut/fill etc).
Thanks
Stuart
|
|
|
|
|
i try to create a big mesh object from vertex and index buffers but; when i use index and vertex buffer manualy like draw indexed primitive itis works good. but when lock and copy both buffers on mesh. mesh->drawsubset not work opmtimaly.
abstract points:
* i use 32 bit indices for create mesh.
* copy vertex and index buffer to locked mesh buffers.
* all codes work good.
* but that rendered plane mesh is not like a plane!!!
points :
* use FVF : NORMAL, POINT, TEX1;
* use 32 bit indices for create mesh.
* use DFMT16 for z-buffer;
* use 40401 vertices.
* use 80000 faces.
* that plane coords 201 to 201 and all normals (0,1,0)
can i told; please help;
|
|
|
|
|
Apparently, English isn't your native language. I think most everyone here will have a difficult time understanding the problems in your code. You should just post your source code, that's what we all understand. In DirectX, especially if you are new to it, errors can be subtle, and hard to spot. Based on your description, we aren't going to have a clue as to what is not working properly.
Are you using source code from a DirectX SDK sample? What version? DirectX 9? DirectX 10? Are you loading the mesh from a file, or creating it from just a list of vertices?
And, this last line,
"* that plane coords 201 to 201 and all normals (0,1,0)"
...really makes no sense at all (but, I'd guess you are having lighting problems, or you wouldn't be using the normals).
It is possible that your graphics card doesn't have the capabilities to render correctly with the Render State you have specified, but, I doubt it. It's probably just the complexity of the mesh object.
|
|
|
|
|
I got a connected line segments. These line segments are connected with a set of vertices. Now, i need to redistribute the vertices over this line in such a way that, all the vertices are equally spaced.
I mean, suppose if the user wants the vertices to be redistributed with the spacing of say 10 units.. Here i need to have new set of vertices, having distance between each pair of points(x,y) should be 10.
One way i tried this is to start with the first point of the connected lines, and read each point(x,y) along the line segment and find whether the distance of these two points is 10. If it is 10, then take the new point as your reference point and repeat the process... This method works fine. But for lines of different angles, the distance is not same.. so i dont get equally spaced points.
Is there any other way out for this..??
Thanks in advance
|
|
|
|
|
You can not do this with arbitrary spacing of the new points, if the old points are not co-linear.
You have to find the common denominator of the length of distance between the given point, and to get even spacing your units-between-new-vertices have to be that number divided by an integer. If, for instance the distance between starting vertices are: {10,6,8,2)
The largest distance between resulting vertices would be 2 (though it could be 1, 0.66, 0.5, 0.4, etc).
If the distances are (10.1,6.07,8,2), then the maximum distance between vertices would be on the order of 0.01 units.
Hope this is not too late, and hope it helps. If it does, it is because you understand what I said, as opposed to me telling you how to do it.
Unless this was a yes or no answer for a test...
Silver member by constant and unflinching longevity.
|
|
|
|
|
Hi,
I want to scale and rotate a bitmap (loaded using GDI+) and save the rotated and scaled bitmap to a file using GDI+.
How can I do it?
Thanks,
modified on Friday, July 31, 2009 5:09 PM
|
|
|
|
|
Did you read the GDI+ documentation on bitmaps?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Did you really understand GDI+? I read GDI+ several days and try to use following code:
Graphics g(hdc);
Image i(L"HelloWorld.bmp");
g.DrawImage(&i,0,1024);
g.TranslateTransform(100.0f, 50.0f);
g.RotateTransform(45.0f);
g.DrawImage(ℑ,0,0);
CLSID jpgClsid;
GetEncoderClsid(L"image/jpeg", &jpgClsid);
i.Save(pIStream1, &jpgClsid);
I had no luck. Did you save a scaled or rotated bitmap using GDI+ before?
|
|
|
|
|
Yes. Read up on the following:
Bitmap.CreateGraphics
Graphics.RotateTransform
Graphics.DrawImage
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thank you very much for reply.
I want to save the rotated Image to a file.
"Graphics.DrawImage" can not save to a file?
Right? Can I get bitmap from rotated "Graphics"?
Best regards,
|
|
|
|
|
I gave you all the pointers you need, and you need all I gave you.
Do some reading and use your brain, I'm not going to hold your hand.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I did not find following function call for the Bitmap class.
Bitmap.CreateGraphics
I tried following:
Graphics g(hdc);
Image i(L"HelloWorld.bmp");
g.DrawImage(&i,0,1024);
g.TranslateTransform(100.0f, 50.0f);
g.RotateTransform(45.0f);
g.DrawImage(ℑ,0,0);
CLSID jpgClsid;
GetEncoderClsid(L"image/jpeg", &jpgClsid);
i.Save(pIStream1, &jpgClsid);
I had no luck.
Any ideas? Did you try to save a rotated or scaled Bitmap before?
|
|
|
|
|
Sorry, my mistake, it is Graphics.FromImage I was thinking of.
transoft wrote: I had no luck.
That is uninformative and unscientific. Doesn't provide a single clue. Read my sig.
transoft wrote: Did you try to save a rotated or scaled Bitmap before?
Yes. I've done many things with images in .NET
However your latest code makes me doubt it is .NET code you want; what's all that hdc and CLSID stuff, I wouldn't need that to solve your original problem.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi
I am using C++ native. I did not using .NET.
It looks like to me that Graphics object would not affect the Bitmap object. I am guessing that before Graphics Object does anything, it will create a copy the Bitmap object and then does bitmap transformation to the copy, and finally delete the Bitmap copy. The original Bitmap did not change.
Thanks
|
|
|
|
|
transoft wrote: it will create a copy the Bitmap
I doubt that verrrrrrrrrrry much.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I've built a utility that grabs the frames from a multi-frame .tif or gif so I can save them to individual files. In one file (a tif fax document) the dimensions are reversed - 11 x 8.5 instead of 8.5 by 11. Text orientation is correct, but not the dimensions.
I assume the problem is on my end because when I open the file in Irfanview it displays correctly. None of the other TIFs I'm testing with are fax documents, and they display correctly. Worth noting that both Paint.net and MS Paint have the same problem I'm having.
Anyone have an idea as to the root of the problem?
|
|
|
|
|
|
hi, please help me to wrtie code project of jawbreaker game in c++.
|
|
|
|
|
Why?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Please deposit $15,000 in my account and I'll get started.
Oh, and by the way I can only do it in my spare time.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|