[Mono-bugs] [Bug 420950] New: error in the DrawString method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 28 02:07:02 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=420950


           Summary: error in the DrawString method
           Product: Mono: Class Libraries
           Version: 1.9
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: daniele.volpi at provincia.cremona.it
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development


I'm using monodevelo 0.19 on fedora 9 with mono 1.9.1 and the
DrawString(string, Font, Brush, RectangleF) does not work, it prints nothing on
the paper.
if I use DrawString(string, Font, Brush, float, float, StringFormat) it works
if I use DrawRectangles(Pen, RectangleF[]) it draws a rectangle
if I use DrawString(string, Font, Brush, RectangleF) nothing appens
I tried to change the font but nothing happened

If I can't use this method how can I draw strings with more than 1 column?
Is there something for reports with monodevelop an linux?

installed packages:

rpm -qa mono*
mono-data-1.9.1-2.fc9.i386
mono-cecil-flowanalysis-0.1-0.5.20080409svn100264.fc9.i386
mono-debugger-devel-0.60-3.fc9.i386
mono-data-postgresql-1.9.1-2.fc9.i386
mono-data-oracle-1.9.1-2.fc9.i386
mono-nunit22-devel-2.2.10-5.fc9.i386
mono-extras-1.9.1-2.fc9.i386
mono-nunit22-2.2.10-5.fc9.i386
mono-sharpcvslib-0.35-3.fc9.i386
mono-basic-1.9-2.fc9.i386
mono-winforms-1.9.1-2.fc9.i386
mono-cecil-flowanalysis-devel-0.1-0.5.20080409svn100264.fc9.i386
mono-debugger-0.60-3.fc9.i386
monodevelop-0.19-6.fc9.i386
mono-core-1.9.1-2.fc9.i386
mono-ndoc-1.3.1-2.fc9.i386
mono-nunit-devel-1.9.1-2.fc9.i386
mono-addins-devel-0.3-5.fc9.i386
mono-addins-0.3-5.fc9.i386
monodoc-1.2.6-2.1.fc9.i386
mono-ndoc-devel-1.3.1-2.fc9.i386
monodevelop-devel-0.19-6.fc9.i386
mono-data-sqlite-1.9.1-2.fc9.i386
mono-jscript-1.9.1-2.fc9.i386
mono-web-1.9.1-2.fc9.i386
mono-nunit-1.9.1-2.fc9.i386
mono-sharpcvslib-devel-0.35-3.fc9.i386
mono-locale-extras-1.9.1-2.fc9.i386
mono-data-sybase-1.9.1-2.fc9.i386
mono-devel-1.9.1-2.fc9.i386

code:

int PrnMarginLeft, PrnMarginRight, PrnMarginTop, PrnMarginBottom;
int y;
int x1,x2,x3;
System.Drawing.Font tableFont = new System.Drawing.Font("Arial",8f,
FontStyle.Regular, GraphicsUnit.Millimeter);
StringFormat format = StringFormat.GenericDefault;
e.Graphics.PageUnit = GraphicsUnit.Millimeter;
PrnMarginLeft = 15;
PrnMarginRight = 7;
PrnMarginTop = 6;
PrnMarginBottom = 15;
x1=PrnMarginLeft+2;
x2=PrnMarginLeft+42;
x3=PrnMarginLeft+47;
float varAltezza3 = tableFont.GetHeight(e.Graphics);
 RectangleF r3 = new RectangleF(x1, y, x2-x1-1, varAltezza3*2);
e.Graphics.DrawString("hello everybody",tableFont,Brushes.Black,r3); //  it
does not work
// e.Graphics.DrawString("hello
everybody",tableFont,Brushes.Black,(float)x1,(float)y); // it works


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list