|
Hi, i'm trying to draw EMF or WMF files in an antialiased way.
I tried GDI+, AA drawing is ok when using DrawLine or other primitives but the DrawImage doesnt produce
AA output when beeing passed a Metafile object containing a WMF or EMF
So is there a way to draw EMF/WMF files with antialias ? (with or without gdi+)
Maybe something exists in order to convert EMF/WMF to EMF+ ? (it seems gdi+ can only AA on EMF+ files)
thanks for your help
|
|
|
|
|
|
Hi, i'm not sure if i've chosen correct place for my post, but
I'm writing an app in VC++ 2005 EE which is going to display some 3D figures on System::Windows::Forms::Panel^ panel
The problem:
I've written my own class which handles all OpenGL stuff. So all I have to do is:
Create new 3D figure object, and draw it with panel's Paint method.
Constructor needs panel's HWND, so i did something like this:
<br />
TFigure *Figure;
Figure = new TCuboid( (HWND)panel->Handle.ToPointer() , panel->Width, panel->Height, 3, 3, 7 );<br />
But this solution doesn't work properly. When i'm trying to initialize OpenGl machine
with this code (inside TCuboid construcor):
<br />
m_gHDC = GetDC( hwnd );
SetupPixelFormat();<br />
m_hRC = wglCreateContext( m_gHDC );
the variable: m_hRC is NULL and it shouldn't be.
GetLastError() returns 2000, which is ERROR_INVALID_PIXEL_FORMAT.
I've tried my class code with other IDE and all was fine.
This is SetupPixelFormat() definition:
<br />
void TFigure::SetupPixelFormat()<br />
{<br />
int nPixelFormat = 0;<br />
PIXELFORMATDESCRIPTOR pfd = {<br />
sizeof(PIXELFORMATDESCRIPTOR),<br />
1,<br />
PFD_DRAW_TO_WINDOW |<br />
PFD_SUPPORT_OPENGL |<br />
PFD_DOUBLEBUFFER,<br />
PFD_TYPE_RGBA,<br />
32,<br />
0, 0, 0, 0, 0, 0,<br />
0,<br />
0,<br />
0,<br />
0,0,0,0,<br />
16,<br />
0,<br />
0,<br />
PFD_MAIN_PLANE,<br />
0,<br />
0, 0, 0 };<br />
<br />
nPixelFormat = ChoosePixelFormat( m_gHDC, &pfd );<br />
SetPixelFormat( m_gHDC, nPixelFormat, &pfd );<br />
}<br />
ChoosePixelFormat( m_gHDC, &pfd ); returns 7
Can somebody help me please?
|
|
|
|
|
Hi all,
Please I need help in printing an OpenGL scene in C#
I'm not a graphic developer, so I don't have any experience in OpenGL, I just have very little information about OpenGL
I've searched the web but results often in VC++, I need C# code to print from OpenGL
also I need help in exporting to bitmap files and WMF files if possible
Thanks alot
|
|
|
|
|
hi friends,
I am developing a web application in that I need incorporate a audio recording control , imge capturing from a web cam and scanner, which enables the user to record audio file, and capture images either from web-cam or from a scanner. is there any activex control providing such features ?
If so, please help me in this regard..
thank u all,
kiran
|
|
|
|
|
hi
if you want suchtype of functionality mail me on my mail id
trioum@yahoo.com
Trioum
|
|
|
|
|
I cannot solve the following problem. I created a scence with directional light (according to OpenGL docs, illuminaton of an object for this sort of light doesnt depend on how far a directional light is from the object). Further, I put a simple primitive (e.g. sphere) into my scence. Now I can run the program and enjoy the resulting picture. However, a problem occures if I try to scale the object (using glScale() function). I am observing a strange effect: setting large scale my object becames darker ("underlightning") and, vise versa, setting scale small my object becames very bright ("overlightning"). My question is how to overcome this effect (i.e. setting different scales I should get same illumination picture).
|
|
|
|
|
|
Hi,
Actually I need to control the Audio of a sound card(Decklink).Is there anyway to control the audio of the decklink card using directshow? For your information I have a sound renderer for the decklink card through which I can able to render the sound and also I had tried to use the IBaseAudio interface through which I can able to control only the system volume not the card volume. Can anyone help me to solve this?
Thanks in advance,
With regards
Raja Bose
Raja Bose
|
|
|
|
|
I found a way to write my game in c#, but it using 3d graphics. XP and voodoo3 don't agree with each other. So i need to know how to change this so i can use software or change it to full screen when it opens:
namespace WindowsGame1
{
class Engine : Microsoft.Xna.Framework.Game
{
Microsoft.Xna.Framework.GraphicsDeviceManager Graphics;
Microsoft.Xna.Framework.Content.ContentManager Content;
Microsoft.Xna.Framework.Graphics.Texture2D mytext;
Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch;
Microsoft.Xna.Framework.Vector2 Spritepos;
public Engine()
{
this.Graphics = new Microsoft.Xna.Framework.GraphicsDeviceManager(this);
this.Content = new Microsoft.Xna.Framework.Content.ContentManager(this.Services);
}
protected override void Initialize()
{
this.Spritepos = new Microsoft.Xna.Framework.Vector2(100f, 50f);
base.Initialize();
}
protected override void LoadGraphicsContent(bool loadAllContent)
{
if (loadAllContent)
{
this.mytext = this.Content.Load<microsoft.xna.framework.graphics.texture2d>(@"new\text\Mike1");
this.SpriteBatch = new Microsoft.Xna.Framework.Graphics.SpriteBatch(this.Graphics.GraphicsDevice);
}
}
protected override void UnloadGraphicsContent(bool unloadAllContent)
{
if (unloadAllContent)
{
this.Content.Unload();
}
}
protected override void Update(Microsoft.Xna.Framework.GameTime gameTime)
{
base.Update(gameTime);
}
protected override void Draw(Microsoft.Xna.Framework.GameTime gameTime)
{
this.Graphics.GraphicsDevice.Clear(Microsoft.Xna.Framework.Graphics.Color.Black);
this.SpriteBatch.Begin(Microsoft.Xna.Framework.Graphics.SpriteBlendMode.AlphaBlend);
this.SpriteBatch.Draw(this.mytext, this.Spritepos, Microsoft.Xna.Framework.Graphics.Color.White);
this.SpriteBatch.End();
base.Draw(gameTime);
}
}
}
Michael
(Up and coming Game programmer)
EST
|
|
|
|
|
Since I am unfamiliar with the Voodoo3, I googled it and came up with this:
Wikipedia Voodoo3[^]
None of this information is presented in your inquiry. Seeing as how you are writing your game in managed DirectX, and you don't show any of the code that demonstrates how you enumerated through the supported video card attributes, I don't really have any idea what technical difficulties you face.
This from MSDN: Because some graphics cards do not support all of the features exposed through Direct3D, a mechanism is provided in Direct3D to probe the graphics hardware. If a particular graphics capability is not supported by the hardware, the check will fail, allowing the programmer to look for a different hardware-accelerated algorithm.
There is a utility that comes with the DirectX SDK (Get Device Capabilities) that iterates through all the video attributes and displays the results graphically, as to whether your card supports standard DirectX operations.
-- modified at 15:59 Saturday 20th October, 2007
|
|
|
|
|
Hi all, I was trying to make a translucent layered window and animate it, but I cannot change bitmap, it loads once and stays as is. There was an article about it but "word-to-word" translation from C# didn't work, can anyone give me an example how to do this? (Delphi or C++)
|
|
|
|
|
Have you read this article?
Layered Windows[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
yes, but this wasn't enough, I need to render a bitmap and draw to my layered window. After I posted that I worked a little and could animate it but another problem appeared, image blends incorrectly, alpha value depends not only on my bitmap's alpha channel but also on intensity of background. I just don't know what to do, as I see parameters are correct but result is steel bad.
|
|
|
|
|
Delfistyaosani wrote: image blends incorrectly, alpha value depends not only on my bitmap's alpha channel but also on intensity of background.
Huh?
Which method are you using: UpdateLayeredWindow() or SetLayeredWindowAttributes()?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
UpdateLayeredWindow(), because I want Per-Pixel alpha blending and need to change bitmap and alpha mask every frame with about 10 to 60 FPS, depending on animation.
I thought, cannot I capture the background, render on it and draw an opaque window between frames? (image jumps on my form while dragging)v
|
|
|
|
|
Hi
I think U have to switch to Photoshop :
In Photoshop there are many properties for layered Layouts.
By Keeping On layer hidden u can work on another layer,
and they provides Better Quality without Rendering the Image Resolution.
Just try it is as easy as u have Experience.
Believe Yourself :->
|
|
|
|
|
OK - so tell me. Does this have anything to do with the OP wanting to draw an animated layered image other than having the word layer in the title.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
Hmmm.. If you're using 32-bit DIBsection(s) for your bitmap(s), you shouldn't have
to worry about the background at all.
If you use a BLENDFUNCTION like
BLENDFUNCTION bf;
bf.BlendOp = AC_SRC_OVER;
bf.BlendFlags = 0;
bf.SourceConstantAlpha = 0xFF;
bf.AlphaFormat = AC_SRC_ALPHA;
and specify the ULW_ALPHA flag when calling UpdateLayeredWindow()
then the per-pixel alpha values in the DIBSection will control all the blending.
Is that what you're looking for or do you need to do special blending with the
background?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi, I use BLENDFUNCTION as you described however smth. stange happens with alpha values. a day ago I found an alternate method but sometimes background jumps while dragging window but blending and Aero effect is perfect. I think this topic can be closed....
|
|
|
|
|
Hi dear
I want to ask you if you know where the first address for image data in monochrome bitmap is. I know the header allocate 54 bytes but I am not sure about this in Monochrome images.
Please if you can tell me where is the location of the first data, I will be so thankful.
Note: the intented image is Monochrome (one bit per pixel)
Thanks
|
|
|
|
|
This is a really vague question.
I have no idea what type of bitmap you're referring to.
Even if I assume it's a Window DIB I couldn't tell you, since the location can
vary if the "bitmap" is/isn't in packed form.
Info like format, source (file/resource) etc. would help.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm trying to write a program with c#. (a game to be exactly) But it wants to us e a 3d card to write it. how would i write one that you can use software graphics??? can anyone help me?
Michael
(Up and coming Game programmer)
EST
|
|
|
|
|
For anyone doing 3D graphics work in C++, it's worth taking a look.
http://www.openscenegraph.org/projects/osg[^]
OpenSceneGraph is an open source high performance 3D graphics toolkit, used by application developers in fields such as visual simulation, games, virtual reality, scientific visualization and modelling. Written entirely in Standard C++ and OpenGL it runs on all Windows platforms, OSX, GNU/Linux, IRIX, Solaris, HP-Ux, AIX and FreeBSD operating systems.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|