Jump to content
Xtreme .Net Talk

Staeff

Members
  • Posts

    4
  • Joined

  • Last visited

Staeff's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. transparent textures from gdi Hello, I'm trying to use the alpha channel of a gdi bitmap, but it isn't working.. does anyone know how to do it? Bild = new Bitmap(200, 200, System.Drawing.Imaging.PixelFormat.Format32bppArgb); Graphics g = Graphics.FromImage(Bild); //those lines also didn't work // SolidBrush bop = new SolidBrush(Color.Green); // g.FillRectangle(bop, 0, 0, 200, 200); // Bild.MakeTransparent(Color.Green); Font f = new Font("Verdana", 30); SolidBrush b = new SolidBrush(Color.FromArgb(255, 255, 0, 0)); g.DrawString("Just one line!", f, b, 5, 40); ReadyTexture3 = Texture.FromBitmap( device, Bild, 0, Pool.Managed); Renderstates: dev.RenderState.AlphaBlendEnable = true; dev.RenderState.SourceBlend = Blend.SourceAlpha; dev.RenderState.DestinationBlend = Blend.InvSourceAlpha;
  2. I'm trying to autosave all open documents in the manager. The only Property I know for accessing a document is FocusedDocument. 1.How can I select other documents. 2.Is there a count property for the number of open documents? Thanks in advance.
  3. Thanks a lot for the Tip! But there's a little problem: GraphicsPath.AddString draws somehow smaller Strings than graphics.DrawString. MeasureString returns the Drawstring Size, I'll try to do a proportional conversion, but that's no nice way..
  4. Hi, I'm trying to get the Bounds for my Text in a path, but it's not working. I wrote following code according to the MSDN Example for a Ellipse.. pth = new GraphicsPath(); p=new Pen(Sermon.TextColor[j],1.0f); pth.AddString("This is just a text", new FontFamily("Arial"),0,20,new Point(10,10),StringFormat.GenericTypographic); graphics.DrawPath(p,pth); MessageBox.Show(Convert.ToString(pth.GetBounds())); I can see the Text, but the Messagebox Shows "{X=0,Y=0,Width=0,Heigth=0}" . I tried it also with an Ellipse and this worked fine.. Any suggestions?
×
×
  • Create New...