Hi Cesar Many thanks for your comprehensive and informative reply !
Paul Cesar wrote: > Hi Paul, > > I'd recommend you to read carefully and execute the samples from this blog > post: > > "Be more productive with GdiPlusX" > http://weblogs.foxite.com/cesarchalom/archive/2006/12/14/3003.aspx > > There you'll find many tips that will help you to know what are the available > method and properties for all classes using Intellisense. Do that and a new > world will appear to you ! > > Anyway, here are my answers: > > 1 - Am I right, or is there a way to define loFont and subsequently change > its style (bold and/or italic) ? > > Unfortunately not. You'll have to redefine, or recreate your font object. > > LOCAL loFont as xfcFont > loFont = .Font.New("Verdana", 24, .FontStyle.BoldItalic) > > > 2 - How would I go about setting the font color (i.e. the pen color) to an > arbitrary color obtained using GETCOLOR() ? > > Here are many ways for you to play with brushes and colors: > > LOCAL loBrush as xfcSolidBrush > loBrush = .Brushes.Red > loBrush = .SolidBrush.New(.Color.Blue) > loBrush = .SolidBrush.New(.Color.FromRgb(RGB(255,0,128))) > loBrush = .SolidBrush.New(.Color.FromArgb(128,255,0,128)) > LOCAL loColor as xfcColor > loColor = _SCREEN.SYSTEM.Drawing.Color.FromRgb(255,0,0) > LOCAL loBrush as xfcSolidBrush > loBrush = _SCREEN.SYSTEM.Drawing.SolidBrush.New() > loBrush.Color = loColor > loBrush.Color = _SCREEN.SYSTEM.Drawing.Color.FromRgb(GETCOLOR()) > loBrush = _SCREEN.SYSTEM.Drawing.SolidBrush.New(loColor) > > Hope This helps > Cesar > > ---------- InĂcio da mensagem original ----------- > De: [EMAIL PROTECTED] > Para: [EMAIL PROTECTED] > Cc: > Data: Mon, 16 Jul 2007 13:57:34 +0100 > Assunto: GDIPlusX questions > >> Hi all >> >> I am using DrawString like this >> >> oGfx.DrawString("Text to draw", loFont, loBlackBrush, x, y) >> >> loFont has been defined using loFont = .Font.New("Arial",10,0) >> >> So far so good. If I want to use Bold it seems that I cannot change >> loFont once it has been constructed but must instead define loFont >> .Font.New("Arial",10,1). Am I right, or is there a way to define loFont >> and subsequently change its style (bold and/or italic) ? >> >> Also, in the above example, loBlackBrush has been constructed with >> loBlackBrush = .Brushes.Black >> >> How would I go about setting the font color (i.e. the pen color) to an >> arbitrary color obtained using GETCOLOR() ? >> >> Thanks >> >> Paul Newton >> >> >> >> >> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

