openMSX
|
#include <Printer.hh>
Classes | |
struct | FontInfo |
Public Member Functions | |
void | write (uint8_t data) override |
void | forceFormFeed () override |
![]() | |
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 (uint8_t data, EmuTime::param time) override |
Sets the data signals. More... | |
void | plugHelper (Connector &connector, EmuTime::param time) override |
void | unplugHelper (EmuTime::param time) override |
![]() | |
virtual bool | getStatus (EmuTime::param time)=0 |
Returns the STATUS signal: false = low = ready, true = high = not ready. More... | |
virtual void | setStrobe (bool strobe, EmuTime::param time)=0 |
Sets the strobe signal: false = low, true = high. More... | |
virtual void | writeData (uint8_t data, EmuTime::param time)=0 |
Sets the data signals. More... | |
std::string_view | getClass () const final |
A pluggable belongs to a certain class. More... | |
![]() | |
virtual | ~Pluggable ()=default |
virtual std::string_view | getName () const |
Name used to identify this pluggable. More... | |
virtual std::string_view | getClass () const =0 |
A pluggable belongs to a certain class. 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 connector. More... | |
Connector * | getConnector () 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 (uint8_t data) |
void | seekPrinterHeadRelative (double offset) |
void | ensurePrintPage () |
void | flushEmulatedPrinter () |
void | printVisibleCharacter (uint8_t data) |
void | plot9Dots (double x, double y, unsigned pattern) |
virtual std::pair< unsigned, unsigned > | getNumberOfDots ()=0 |
virtual void | resetSettings ()=0 |
virtual unsigned | calcEscSequenceLength (uint8_t character)=0 |
virtual void | processEscSequence ()=0 |
virtual void | processCharacter (uint8_t data)=0 |
![]() | |
PrinterCore ()=default | |
~PrinterCore () override=default | |
virtual void | write (uint8_t data)=0 |
virtual void | forceFormFeed ()=0 |
![]() | |
Pluggable () | |
virtual void | plugHelper (Connector &newConnector, EmuTime::param time)=0 |
virtual void | unplugHelper (EmuTime::param time)=0 |
void | setConnector (Connector *conn) |
Protected Attributes | |
double | graphDensity |
double | fontDensity |
double | hpos |
double | vpos |
double | pageTop |
double | lineFeed |
double | pageHeight |
double | printAreaTop = -1.0 |
double | printAreaBottom = 0.0 |
double | pixelSizeX |
double | pixelSizeY |
int | eightBit = 0 |
unsigned | perforationSkip = 0 |
unsigned | leftBorder |
unsigned | rightBorder |
unsigned | fontWidth |
unsigned | remainingCommandBytes = 0 |
unsigned | sizeEscPos = 0 |
unsigned | sizeRemainingDataBytes = 0 |
unsigned | ramLoadOffset = 0 |
unsigned | ramLoadEnd = 0 |
unsigned | lines |
CountryCode | countryCode = CC_USA |
std::array< uint8_t, MAX_ESC_CMDSIZE > | abEscSeq |
struct openmsx::ImagePrinter::FontInfo | fontInfo |
bool | letterQuality = false |
bool | bold = false |
bool | proportional = false |
bool | italic = false |
bool | superscript = false |
bool | subscript = false |
bool | doubleWidth = false |
bool | underline = false |
bool | doubleStrike = false |
bool | escSequence = false |
bool | alternateChar = false |
bool | detectPaperOut = false |
bool | japanese = false |
bool | normalAfterLine = false |
bool | ninePinGraphics = false |
bool | leftToRight = false |
bool | elite = false |
bool | compressed = false |
bool | noHighEscapeCodes = false |
Static Protected Attributes | |
static constexpr unsigned | PIXEL_WIDTH = 8 |
static constexpr int | MAX_ESC_CMDSIZE = 8 |
static constexpr int | MAX_FONT_WIDTH = 12 |
Definition at line 69 of file Printer.hh.
|
protected |
Enumerator | |
---|---|
CC_USA | |
CC_FRANCE | |
CC_GERMANY | |
CC_UNITED_KINGDOM | |
CC_DENMARK | |
CC_SWEDEN | |
CC_ITALY | |
CC_SPAIN | |
CC_JAPAN |
Definition at line 118 of file Printer.hh.
|
protected |
Definition at line 108 of file Printer.cc.
|
overrideprotected |
Definition at line 119 of file Printer.cc.
References flushEmulatedPrinter().
|
protectedpure virtual |
Referenced by write().
|
protected |
Definition at line 215 of file Printer.cc.
References getNumberOfDots(), pixelSizeX, and pixelSizeY.
Referenced by printGraphicByte(), and printVisibleCharacter().
|
protected |
Definition at line 233 of file Printer.cc.
References Math::e, openmsx::MSXMotherBoard::getMSXCliComm(), hpos, leftBorder, pageTop, printAreaBottom, printAreaTop, openmsx::CliComm::printInfo(), openmsx::CliComm::printWarning(), and vpos.
Referenced by forceFormFeed(), seekPrinterHeadRelative(), and ~ImagePrinter().
|
overridevirtual |
Implements openmsx::PrinterCore.
Definition at line 159 of file Printer.cc.
References flushEmulatedPrinter().
|
protectedpure virtual |
Referenced by ensurePrintPage().
|
protected |
Definition at line 173 of file Printer.cc.
References pixelSizeY, and xrange().
Referenced by printGraphicByte(), and printVisibleCharacter().
|
protected |
Definition at line 182 of file Printer.cc.
References ensurePrintPage(), graphDensity, hpos, gl::max(), gl::min(), pixelSizeX, pixelSizeY, plot9Dots(), printAreaBottom, printAreaTop, Math::reverseByte(), seekPrinterHeadRelative(), and vpos.
Referenced by write().
|
protected |
Definition at line 264 of file Printer.cc.
References bold, openmsx::ImagePrinter::FontInfo::charWidth, doubleStrike, doubleWidth, end(), ensurePrintPage(), fontDensity, fontInfo, hpos, gl::max(), gl::min(), openmsx::ImagePrinter::FontInfo::pixelDelta, pixelSizeX, pixelSizeY, plot9Dots(), printAreaBottom, printAreaTop, proportional, openmsx::ImagePrinter::FontInfo::ram, openmsx::ImagePrinter::FontInfo::rom, seekPrinterHeadRelative(), subscript, subspan(), superscript, underline, openmsx::ImagePrinter::FontInfo::useRam, vpos, and xrange().
|
protectedpure virtual |
Referenced by write().
|
protectedpure virtual |
Referenced by write().
|
protected |
Definition at line 164 of file Printer.cc.
References hpos, leftBorder, lineFeed, lines, pageHeight, pageTop, resetSettings(), and vpos.
Referenced by openmsx::ImagePrinterEpson::ImagePrinterEpson(), and openmsx::ImagePrinterMSX::ImagePrinterMSX().
|
protectedpure virtual |
Referenced by resetEmulatedPrinter().
|
protected |
Definition at line 202 of file Printer.cc.
References doubleWidth, flushEmulatedPrinter(), hpos, leftBorder, lineFeed, normalAfterLine, pageHeight, rightBorder, and vpos.
Referenced by printGraphicByte(), and printVisibleCharacter().
|
overridevirtual |
Implements openmsx::PrinterCore.
Definition at line 124 of file Printer.cc.
References abEscSeq, calcEscSequenceLength(), eightBit, escSequence, ranges::fill(), fontInfo, printGraphicByte(), processCharacter(), processEscSequence(), openmsx::ImagePrinter::FontInfo::ram, ramLoadEnd, ramLoadOffset, remainingCommandBytes, sizeEscPos, and sizeRemainingDataBytes.
|
protected |
Definition at line 132 of file Printer.hh.
Referenced by write().
|
protected |
Definition at line 153 of file Printer.hh.
|
protected |
Definition at line 144 of file Printer.hh.
Referenced by printVisibleCharacter().
|
protected |
Definition at line 160 of file Printer.hh.
|
protected |
Definition at line 129 of file Printer.hh.
|
protected |
Definition at line 154 of file Printer.hh.
|
protected |
Definition at line 151 of file Printer.hh.
Referenced by printVisibleCharacter().
|
protected |
Definition at line 149 of file Printer.hh.
Referenced by printVisibleCharacter(), and seekPrinterHeadRelative().
|
protected |
Definition at line 107 of file Printer.hh.
Referenced by write().
|
protected |
Definition at line 159 of file Printer.hh.
|
protected |
Definition at line 152 of file Printer.hh.
Referenced by write().
|
protected |
Definition at line 97 of file Printer.hh.
Referenced by printVisibleCharacter().
|
protected |
Referenced by printVisibleCharacter(), and write().
|
protected |
Definition at line 111 of file Printer.hh.
|
protected |
Definition at line 96 of file Printer.hh.
Referenced by printGraphicByte().
|
protected |
Definition at line 98 of file Printer.hh.
Referenced by flushEmulatedPrinter(), printGraphicByte(), printVisibleCharacter(), resetEmulatedPrinter(), and seekPrinterHeadRelative().
|
protected |
Definition at line 146 of file Printer.hh.
|
protected |
Definition at line 155 of file Printer.hh.
|
protected |
Definition at line 109 of file Printer.hh.
Referenced by flushEmulatedPrinter(), resetEmulatedPrinter(), and seekPrinterHeadRelative().
|
protected |
Definition at line 158 of file Printer.hh.
|
protected |
Definition at line 143 of file Printer.hh.
|
protected |
Definition at line 101 of file Printer.hh.
Referenced by resetEmulatedPrinter(), and seekPrinterHeadRelative().
|
protected |
Definition at line 117 of file Printer.hh.
Referenced by resetEmulatedPrinter().
|
staticconstexprprotected |
Definition at line 131 of file Printer.hh.
|
staticconstexprprotected |
Definition at line 134 of file Printer.hh.
|
protected |
Definition at line 157 of file Printer.hh.
|
protected |
Definition at line 161 of file Printer.hh.
|
protected |
Definition at line 156 of file Printer.hh.
Referenced by seekPrinterHeadRelative().
|
protected |
Definition at line 102 of file Printer.hh.
Referenced by resetEmulatedPrinter(), and seekPrinterHeadRelative().
|
protected |
Definition at line 100 of file Printer.hh.
Referenced by flushEmulatedPrinter(), and resetEmulatedPrinter().
|
protected |
Definition at line 108 of file Printer.hh.
|
staticconstexprprotected |
Definition at line 94 of file Printer.hh.
|
protected |
Definition at line 105 of file Printer.hh.
Referenced by ensurePrintPage(), printGraphicByte(), and printVisibleCharacter().
|
protected |
Definition at line 106 of file Printer.hh.
Referenced by ensurePrintPage(), plot9Dots(), printGraphicByte(), and printVisibleCharacter().
|
protected |
Definition at line 104 of file Printer.hh.
Referenced by flushEmulatedPrinter(), printGraphicByte(), and printVisibleCharacter().
|
protected |
Definition at line 103 of file Printer.hh.
Referenced by flushEmulatedPrinter(), printGraphicByte(), and printVisibleCharacter().
|
protected |
Definition at line 145 of file Printer.hh.
Referenced by printVisibleCharacter().
|
protected |
Definition at line 116 of file Printer.hh.
Referenced by write().
|
protected |
Definition at line 115 of file Printer.hh.
Referenced by write().
|
protected |
Definition at line 112 of file Printer.hh.
Referenced by write().
|
protected |
Definition at line 110 of file Printer.hh.
Referenced by seekPrinterHeadRelative().
|
protected |
Definition at line 113 of file Printer.hh.
Referenced by write().
|
protected |
Definition at line 114 of file Printer.hh.
Referenced by write().
|
protected |
Definition at line 148 of file Printer.hh.
Referenced by printVisibleCharacter().
|
protected |
Definition at line 147 of file Printer.hh.
Referenced by printVisibleCharacter().
|
protected |
Definition at line 150 of file Printer.hh.
Referenced by printVisibleCharacter().
|
protected |
Definition at line 99 of file Printer.hh.
Referenced by flushEmulatedPrinter(), printGraphicByte(), printVisibleCharacter(), resetEmulatedPrinter(), and seekPrinterHeadRelative().