Update of /cvsroot/krysalis/krysalis-barcode/src/java/org/krysalis/barcode/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv26781/src/java/org/krysalis/barcode/impl
Modified Files:
GenericBarcodeImpl.java
Log Message:
Make font and font size configurable (use in Barcode XML)
Index: GenericBarcodeImpl.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-barcode/src/java/org/krysalis/barcode/impl/GenericBarcodeImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** GenericBarcodeImpl.java 29 Oct 2003 07:50:26 -0000 1.6
--- GenericBarcodeImpl.java 6 Nov 2003 15:05:29 -0000 1.7
***************
*** 96,100 ****
*/
public void configure(Configuration cfg) throws ConfigurationException {
! //Height
Length h = new Length(cfg.getChild("height").getValue("15mm"), "mm");
this.setHeight(h.getValueAsMillimeter());
--- 96,114 ----
*/
public void configure(Configuration cfg) throws ConfigurationException {
! //Human-readable placement
! this.msgPos = HumanReadablePlacement.byName(
! cfg.getChild("human-readable").getValue(HumanReadablePlacement.HRP_BOTTOM.getName()));
!
! Length fs = new Length(cfg.getChild("human-readable-size").getValue("8pt"));
! if (fs.getUnit().equals("pt")) {
! this.fontSize = fs.getValue();
! } else {
! this.fontSize = UnitConv.mm2pt(fs.getValueAsMillimeter());
! }
!
! /* this does not seem to work */
! this.fontName = cfg.getChild("human-readable-font").getValue("Helvetica");
!
! //Height (must be evaluated after the font size because of setHeight())
Length h = new Length(cfg.getChild("height").getValue("15mm"), "mm");
this.setHeight(h.getValueAsMillimeter());
***************
*** 108,115 ****
this.quietZone = qz.getValueAsMillimeter();
}
-
- //Human-readable placement
- this.msgPos = HumanReadablePlacement.byName(
- cfg.getChild("human-readable").getValue(HumanReadablePlacement.HRP_BOTTOM.getName()));
}
--- 122,125 ----
***************
*** 267,269 ****
throw new UnsupportedOperationException("NYI");
}
! }
\ No newline at end of file
--- 277,279 ----
throw new UnsupportedOperationException("NYI");
}
! }
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.