PowerTools ActiveReports for .NET 11.0J
Draw(Graphics,RectangleF) メソッド
使用例 

構文
'宣言
 
Public Overloads Sub Draw( _
   ByVal graphics As Graphics, _
   ByVal bounds As RectangleF _
) 
public void Draw( 
   Graphics graphics,
   RectangleF bounds
)

パラメータ

graphics
bounds
使用例
private void arScale()
{    
    aPage = new GrapeCity.ActiveReports.Document.Page();    
    GrapeCity.ActiveReports.Interop.SystemPrinter m_myARPrinter = new GrapeCity.        
        ActiveReports.Interop.SystemPrinter();    
    m_myARPrinter.StartJob("Test Printer");    
    System.Drawing.RectangleF rec;    
    float xOffSet = m_myARPrinter.PhysicalOffsetX/m_myARPrinter.Graphics.DpiX;    
    float yOffSet = m_myARPrinter.PhysicalOffsetY/m_myARPrinter.Graphics.DpiY;    
    float adjustedWidth = (aPage.Width/3)-(xOffSet*2);    
    float xPos = 0;    
    int nCount = rpt.Document.Pages.Count;    
    m_myARPrinter.StartPage();    
    For(int i=0; i < nCount; i++)    
    {        
        aPage = rpt.Document.Pages[i];        
        m_myARPrinter.Graphics.PageUnit = System.Drawing.GraphicsUnit.Pixel;        
        rec = System.Drawing.RectangleF.FromLTRB(xOffSet+xPos, yOffSet,(xOffSet+xPos)+            
            adjustedWidth,yOffSet+adjustedWidth);        
        xPos = adjustedWidth + xPos;        
        aPage.Draw(m_myARPrinter.Graphics,rec);          
    }    
    m_myARPrinter.EndPage();    
    m_myARPrinter.EndJob();
}
Private Sub arScale()    
    m_myARPrinter.StartJob("Test Printer")    
    Dim aPage As New GrapeCity.ActiveReports.Document.Page()    
    Dim rec As New System.Drawing.RectangleF()    
    Dim xOffSet As Single    
    Dim yOffSet As Single    
    Dim adjustedWidth As Single    
    Dim xPos As Single        
    xOffSet = m_myARPrinter.PhysicalOffsetX / m_myARPrinter.Graphics.DpiX    
    yOffSet = m_myARPrinter.PhysicalOffsetY / m_myARPrinter.Graphics.DpiY    
    adjustedWidth = (aPage.Width / 3) - (xOffSet / 2)    
    xPos = 0    
    Dim nCount As Integer    
    nCount = rpt.Document.Pages.Count    
    m_myARPrinter.StartPage()    
    For i = 0 To nCount - 1        
        aPage = rpt.Document.Pages(i)        
        m_myARPrinter.Graphics.PageUnit = GraphicsUnit.Pixel        
        rec = System.Drawing.RectangleF.FromLTRB(xOffSet + xPos, yOffSet, (xOffSet + xPos) + _            
            adjustedWidth, yOffSet + adjustedWidth)        
        xPos = adjustedWidth + xPos        
        aPage.Draw(m_myARPrinter.Graphics, rec)    
    Next    
    m_myARPrinter.EndPage()    
    m_myARPrinter.EndJob()
End Sub
参照

関連項目

Page クラス
Page メンバ
オーバーロード一覧

 

 


©2003-2017 GrapeCity inc. All rights reserved.