openMSX
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
openmsx::ImagePrinter Class Referenceabstract

#include <Printer.hh>

Inheritance diagram for openmsx::ImagePrinter:
Inheritance graph
[legend]
Collaboration diagram for openmsx::ImagePrinter:
Collaboration graph
[legend]

Classes

struct  FontInfo
 

Public Member Functions

void write (byte data) override
 
void forceFormFeed () override
 
- Public Member Functions inherited from openmsx::PrinterCore
bool getStatus (EmuTime::param time) override
 Returns the STATUS signal: false = low = ready, true = high = not ready. More...
 
void setStrobe (bool strobe, EmuTime::param time) override
 Sets the strobe signal: false = low, true = high. More...
 
void writeData (byte data, EmuTime::param time) override
 Sets the data signals. More...
 
void plugHelper (Connector &connector, EmuTime::param time) override
 
void unplugHelper (EmuTime::param time) override
 
- Public Member Functions inherited from openmsx::PrinterPortDevice
std::string_view getClass () const final override
 A pluggable belongs to a certain class. More...
 
- Public Member Functions inherited from openmsx::Pluggable
virtual ~Pluggable ()=default
 
virtual const std::string & getName () const
 Name used to identify this pluggable. More...
 
virtual std::string_view getDescription () const =0
 Description for this pluggable. More...
 
void plug (Connector &connector, EmuTime::param time)
 This method is called when this pluggable is inserted in a connector. More...
 
void unplug (EmuTime::param time)
 This method is called when this pluggable is removed from a conector. More...
 
ConnectorgetConnector () const
 Get the connector this Pluggable is plugged into. More...
 
bool isPluggedIn () const
 Returns true if this pluggable is currently plugged into a connector. More...
 

Protected Types

enum  CountryCode {
  CC_USA = 0, CC_FRANCE = 1, CC_GERMANY = 2, CC_UNITED_KINGDOM = 3,
  CC_DENMARK = 4, CC_SWEDEN = 5, CC_ITALY = 6, CC_SPAIN = 7,
  CC_JAPAN = 8
}
 

Protected Member Functions

 ImagePrinter (MSXMotherBoard &motherBoard, bool graphicsHiLo)
 
 ~ImagePrinter () override
 
void resetEmulatedPrinter ()
 
void printGraphicByte (byte data)
 
void seekPrinterHeadRelative (double offset)
 
void ensurePrintPage ()
 
void flushEmulatedPrinter ()
 
void printVisibleCharacter (byte data)
 
void plot9Dots (double x, double y, unsigned pattern)
 
virtual void getNumberOfDots (unsigned &dotsX, unsigned &dotsY)=0
 
virtual void resetSettings ()=0
 
virtual unsigned calcEscSequenceLength (byte character)=0
 
virtual void processEscSequence ()=0
 
virtual void processCharacter (byte data)=0
 
- Protected Member Functions inherited from openmsx::PrinterCore
 PrinterCore ()=default
 
 ~PrinterCore () override=default
 
- Protected Member Functions inherited from openmsx::Pluggable
 Pluggable ()
 
void setConnector (Connector *conn)
 

Protected Attributes

double graphDensity
 
double fontDensity
 
double hpos
 
double vpos
 
double pageTop
 
double lineFeed
 
double pageHeight
 
double printAreaTop
 
double printAreaBottom
 
double pixelSizeX
 
double pixelSizeY
 
int eightBit
 
unsigned perforationSkip
 
unsigned leftBorder
 
unsigned rightBorder
 
unsigned fontWidth
 
unsigned remainingCommandBytes
 
unsigned sizeEscPos
 
unsigned sizeRemainingDataBytes
 
unsigned ramLoadOffset
 
unsigned ramLoadEnd
 
unsigned lines
 
CountryCode countryCode
 
byte abEscSeq [MAX_ESC_CMDSIZE]
 
struct openmsx::ImagePrinter::FontInfo fontInfo
 
bool letterQuality
 
bool bold
 
bool proportional
 
bool italic
 
bool superscript
 
bool subscript
 
bool doubleWidth
 
bool underline
 
bool doubleStrike
 
bool escSequence
 
bool alternateChar
 
bool detectPaperOut
 
bool japanese
 
bool normalAfterLine
 
bool ninePinGraphics
 
bool leftToRight
 
bool elite
 
bool compressed
 
bool noHighEscapeCodes
 

Static Protected Attributes

static constexpr unsigned PIXEL_WIDTH = 8
 
static constexpr int MAX_ESC_CMDSIZE = 8
 
static constexpr int MAX_FONT_WIDTH = 12
 

Detailed Description

Definition at line 68 of file Printer.hh.

Member Enumeration Documentation

◆ CountryCode

Enumerator
CC_USA 
CC_FRANCE 
CC_GERMANY 
CC_UNITED_KINGDOM 
CC_DENMARK 
CC_SWEDEN 
CC_ITALY 
CC_SPAIN 
CC_JAPAN 

Definition at line 116 of file Printer.hh.

Constructor & Destructor Documentation

◆ ImagePrinter()

openmsx::ImagePrinter::ImagePrinter ( MSXMotherBoard motherBoard,
bool  graphicsHiLo 
)
protected

◆ ~ImagePrinter()

openmsx::ImagePrinter::~ImagePrinter ( )
overrideprotected

Definition at line 153 of file Printer.cc.

References flushEmulatedPrinter().

Member Function Documentation

◆ calcEscSequenceLength()

virtual unsigned openmsx::ImagePrinter::calcEscSequenceLength ( byte  character)
protectedpure virtual

Referenced by write().

◆ ensurePrintPage()

void openmsx::ImagePrinter::ensurePrintPage ( )
protected

Definition at line 249 of file Printer.cc.

References getNumberOfDots(), pixelSizeX, and pixelSizeY.

Referenced by printGraphicByte(), and printVisibleCharacter().

◆ flushEmulatedPrinter()

void openmsx::ImagePrinter::flushEmulatedPrinter ( )
protected

◆ forceFormFeed()

void openmsx::ImagePrinter::forceFormFeed ( )
overridevirtual

Implements openmsx::PrinterCore.

Definition at line 193 of file Printer.cc.

References flushEmulatedPrinter().

◆ getNumberOfDots()

virtual void openmsx::ImagePrinter::getNumberOfDots ( unsigned &  dotsX,
unsigned &  dotsY 
)
protectedpure virtual

Referenced by ensurePrintPage().

◆ plot9Dots()

void openmsx::ImagePrinter::plot9Dots ( double  x,
double  y,
unsigned  pattern 
)
protected

Definition at line 207 of file Printer.cc.

References pixelSizeY, and openmsx::x.

Referenced by printGraphicByte(), and printVisibleCharacter().

◆ printGraphicByte()

void openmsx::ImagePrinter::printGraphicByte ( byte  data)
protected

◆ printVisibleCharacter()

void openmsx::ImagePrinter::printVisibleCharacter ( byte  data)
protected

◆ processCharacter()

virtual void openmsx::ImagePrinter::processCharacter ( byte  data)
protectedpure virtual

Referenced by write().

◆ processEscSequence()

virtual void openmsx::ImagePrinter::processEscSequence ( )
protectedpure virtual

Referenced by write().

◆ resetEmulatedPrinter()

void openmsx::ImagePrinter::resetEmulatedPrinter ( )
protected

◆ resetSettings()

virtual void openmsx::ImagePrinter::resetSettings ( )
protectedpure virtual

Referenced by resetEmulatedPrinter().

◆ seekPrinterHeadRelative()

void openmsx::ImagePrinter::seekPrinterHeadRelative ( double  offset)
protected

◆ write()

void openmsx::ImagePrinter::write ( byte  data)
overridevirtual

Member Data Documentation

◆ abEscSeq

byte openmsx::ImagePrinter::abEscSeq[MAX_ESC_CMDSIZE]
protected

Definition at line 130 of file Printer.hh.

Referenced by write().

◆ alternateChar

bool openmsx::ImagePrinter::alternateChar
protected

Definition at line 151 of file Printer.hh.

Referenced by ImagePrinter().

◆ bold

bool openmsx::ImagePrinter::bold
protected

Definition at line 142 of file Printer.hh.

Referenced by ImagePrinter(), and printVisibleCharacter().

◆ compressed

bool openmsx::ImagePrinter::compressed
protected

Definition at line 158 of file Printer.hh.

Referenced by ImagePrinter().

◆ countryCode

CountryCode openmsx::ImagePrinter::countryCode
protected

Definition at line 127 of file Printer.hh.

Referenced by ImagePrinter().

◆ detectPaperOut

bool openmsx::ImagePrinter::detectPaperOut
protected

Definition at line 152 of file Printer.hh.

Referenced by ImagePrinter().

◆ doubleStrike

bool openmsx::ImagePrinter::doubleStrike
protected

Definition at line 149 of file Printer.hh.

Referenced by ImagePrinter(), and printVisibleCharacter().

◆ doubleWidth

bool openmsx::ImagePrinter::doubleWidth
protected

Definition at line 147 of file Printer.hh.

Referenced by ImagePrinter(), printVisibleCharacter(), and seekPrinterHeadRelative().

◆ eightBit

int openmsx::ImagePrinter::eightBit
protected

Definition at line 105 of file Printer.hh.

Referenced by ImagePrinter(), and write().

◆ elite

bool openmsx::ImagePrinter::elite
protected

Definition at line 157 of file Printer.hh.

Referenced by ImagePrinter().

◆ escSequence

bool openmsx::ImagePrinter::escSequence
protected

Definition at line 150 of file Printer.hh.

Referenced by ImagePrinter(), and write().

◆ fontDensity

double openmsx::ImagePrinter::fontDensity
protected

Definition at line 95 of file Printer.hh.

Referenced by printVisibleCharacter().

◆ fontInfo

struct openmsx::ImagePrinter::FontInfo openmsx::ImagePrinter::fontInfo
protected

Referenced by printVisibleCharacter(), and write().

◆ fontWidth

unsigned openmsx::ImagePrinter::fontWidth
protected

Definition at line 109 of file Printer.hh.

◆ graphDensity

double openmsx::ImagePrinter::graphDensity
protected

Definition at line 94 of file Printer.hh.

Referenced by printGraphicByte().

◆ hpos

double openmsx::ImagePrinter::hpos
protected

◆ italic

bool openmsx::ImagePrinter::italic
protected

Definition at line 144 of file Printer.hh.

Referenced by ImagePrinter().

◆ japanese

bool openmsx::ImagePrinter::japanese
protected

Definition at line 153 of file Printer.hh.

Referenced by ImagePrinter().

◆ leftBorder

unsigned openmsx::ImagePrinter::leftBorder
protected

Definition at line 107 of file Printer.hh.

Referenced by flushEmulatedPrinter(), resetEmulatedPrinter(), and seekPrinterHeadRelative().

◆ leftToRight

bool openmsx::ImagePrinter::leftToRight
protected

Definition at line 156 of file Printer.hh.

Referenced by ImagePrinter().

◆ letterQuality

bool openmsx::ImagePrinter::letterQuality
protected

Definition at line 141 of file Printer.hh.

Referenced by ImagePrinter().

◆ lineFeed

double openmsx::ImagePrinter::lineFeed
protected

Definition at line 99 of file Printer.hh.

Referenced by resetEmulatedPrinter(), and seekPrinterHeadRelative().

◆ lines

unsigned openmsx::ImagePrinter::lines
protected

Definition at line 115 of file Printer.hh.

Referenced by resetEmulatedPrinter().

◆ MAX_ESC_CMDSIZE

constexpr int openmsx::ImagePrinter::MAX_ESC_CMDSIZE = 8
staticconstexprprotected

Definition at line 129 of file Printer.hh.

◆ MAX_FONT_WIDTH

constexpr int openmsx::ImagePrinter::MAX_FONT_WIDTH = 12
staticconstexprprotected

Definition at line 132 of file Printer.hh.

◆ ninePinGraphics

bool openmsx::ImagePrinter::ninePinGraphics
protected

Definition at line 155 of file Printer.hh.

Referenced by ImagePrinter().

◆ noHighEscapeCodes

bool openmsx::ImagePrinter::noHighEscapeCodes
protected

Definition at line 159 of file Printer.hh.

Referenced by ImagePrinter().

◆ normalAfterLine

bool openmsx::ImagePrinter::normalAfterLine
protected

Definition at line 154 of file Printer.hh.

Referenced by ImagePrinter(), and seekPrinterHeadRelative().

◆ pageHeight

double openmsx::ImagePrinter::pageHeight
protected

Definition at line 100 of file Printer.hh.

Referenced by resetEmulatedPrinter(), and seekPrinterHeadRelative().

◆ pageTop

double openmsx::ImagePrinter::pageTop
protected

Definition at line 98 of file Printer.hh.

Referenced by flushEmulatedPrinter(), and resetEmulatedPrinter().

◆ perforationSkip

unsigned openmsx::ImagePrinter::perforationSkip
protected

Definition at line 106 of file Printer.hh.

Referenced by ImagePrinter().

◆ PIXEL_WIDTH

constexpr unsigned openmsx::ImagePrinter::PIXEL_WIDTH = 8
staticconstexprprotected

Definition at line 92 of file Printer.hh.

◆ pixelSizeX

double openmsx::ImagePrinter::pixelSizeX
protected

Definition at line 103 of file Printer.hh.

Referenced by ensurePrintPage(), printGraphicByte(), and printVisibleCharacter().

◆ pixelSizeY

double openmsx::ImagePrinter::pixelSizeY
protected

Definition at line 104 of file Printer.hh.

Referenced by ensurePrintPage(), plot9Dots(), printGraphicByte(), and printVisibleCharacter().

◆ printAreaBottom

double openmsx::ImagePrinter::printAreaBottom
protected

◆ printAreaTop

double openmsx::ImagePrinter::printAreaTop
protected

◆ proportional

bool openmsx::ImagePrinter::proportional
protected

Definition at line 143 of file Printer.hh.

Referenced by ImagePrinter(), and printVisibleCharacter().

◆ ramLoadEnd

unsigned openmsx::ImagePrinter::ramLoadEnd
protected

Definition at line 114 of file Printer.hh.

Referenced by ImagePrinter(), and write().

◆ ramLoadOffset

unsigned openmsx::ImagePrinter::ramLoadOffset
protected

Definition at line 113 of file Printer.hh.

Referenced by ImagePrinter(), and write().

◆ remainingCommandBytes

unsigned openmsx::ImagePrinter::remainingCommandBytes
protected

Definition at line 110 of file Printer.hh.

Referenced by ImagePrinter(), and write().

◆ rightBorder

unsigned openmsx::ImagePrinter::rightBorder
protected

Definition at line 108 of file Printer.hh.

Referenced by seekPrinterHeadRelative().

◆ sizeEscPos

unsigned openmsx::ImagePrinter::sizeEscPos
protected

Definition at line 111 of file Printer.hh.

Referenced by ImagePrinter(), and write().

◆ sizeRemainingDataBytes

unsigned openmsx::ImagePrinter::sizeRemainingDataBytes
protected

Definition at line 112 of file Printer.hh.

Referenced by ImagePrinter(), and write().

◆ subscript

bool openmsx::ImagePrinter::subscript
protected

Definition at line 146 of file Printer.hh.

Referenced by ImagePrinter(), and printVisibleCharacter().

◆ superscript

bool openmsx::ImagePrinter::superscript
protected

Definition at line 145 of file Printer.hh.

Referenced by ImagePrinter(), and printVisibleCharacter().

◆ underline

bool openmsx::ImagePrinter::underline
protected

Definition at line 148 of file Printer.hh.

Referenced by ImagePrinter(), and printVisibleCharacter().

◆ vpos

double openmsx::ImagePrinter::vpos
protected

The documentation for this class was generated from the following files: