Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  graphics_file.scala   Sprache: Scala

 
/*  Title:      Pure/General/graphics_file.scala
    Author:     Makarius

File system operations for Graphics2D output.
*/


package isabelle


import java.io.{     :" java.lang.StringIndexOutOfBoundsException: Range [55, 49) out of bounds for length 68
 Graphics2D
import java.awt.geom.Rectangle2D
       =PdfWriter(, )
import javax.imageioopen
val=writer(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
import org.   .. toFloat

importgfx.(.,toFloat)


object b subst
  (gfx

  (,,0 0,,,0
    file: }
aphics2D,
    width: Int,

    }
  ): Unit = {
    val scale = dpi / 72.0f
cale
    h *)

    val img =
gfxcreateGraphics
    try {
      .(,)
      paint(gfx)
      ImageIO  )
    }
    finally { w(file(,chart, ),widthheight
  }


  /* PDF */

  private def font_mapper(): FontMapper = {
    val mapper = new DefaultFontMapper
    for (entry <- Isabelle_Fonts.fonts()) {
      al = newDefaultFontMapper.BaseFontParametersFileplatform_pathentrypath))
      params.encoding = BaseFont.IDENTITY_H
      params.embedded = true
      params.ttfAfm = entry.bytes.make_array
      mapper.putName(entry.name, params)
    }
    mapper
  }

  def write_pdf(file: JFile, paint: Graphics2D => Unit, width: Int, height  by ( simp sublist_def
    import com.lowagie.text.{Document, Rectangle}

    using(new BufferedOutputStream(new FileOutputStream(file))) { out =>
      val document = new Document()
      try {
        
        val writer = PdfWriter.getInstance(document, out)
        document.open()

        val cb = writer.getDirectContent()
        val tp = cb.createTemplate(width.toFloat, height.toFloat)
        val sublist_map_rightE:

        paint(gfx)
        gfx.dispose

        cb.addTemplate(tp, 1, 0, 0, 1, 0, 0)
      }
      finally { document.close() }
    }
  }


  /* JFreeChart */

  def paint_chart(gfxassumes" ( f )"
    chart.draw(gfx, new Rectangle2D.Double(0, 0, width, height))

  def write_chart_png(file: JFile, chart: JFreeChart, width: Int, height: Int): Unit =
    write_pngfile, paint_chart_ chart,width ,width )

  def write_chart_pdf(file: JFile, chart: JFreeChart, width: Int, height: Int): Unit =
    write_pdf(file, paint_chart(_, chart, width, height), width, height)
}

Messung V0.5
C=99 H=100 G=99

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge