PDF Clown
0.1.2

org.pdfclown.documents.contents.objects
Class SetFont

java.lang.Object
  extended by org.pdfclown.documents.contents.objects.ContentObject
      extended by org.pdfclown.documents.contents.objects.Operation
          extended by org.pdfclown.documents.contents.objects.SetFont
All Implemented Interfaces:
IResourceReference<Font>

@PDF(value=PDF10)
public final class SetFont
extends Operation
implements IResourceReference<Font>

'Set the text font' operation [PDF:1.6:5.2].

Since:
0.0.4
Version:
0.1.2, 02/04/12
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Field Summary
static String Operator
           
 
Fields inherited from class org.pdfclown.documents.contents.objects.Operation
operands, operator
 
Constructor Summary
SetFont(List<PdfDirectObject> operands)
           
SetFont(PdfName name, double size)
           
 
Method Summary
 Font getFont(IContentContext context)
          Gets the font resource to be set.
 PdfName getName()
          Gets the resource name.
 Font getResource(IContentContext context)
          Gets the referenced resource.
 double getSize()
          Gets the font size to be set.
 void scan(ContentScanner.GraphicsState state)
          Applies this object to the specified graphics context, updating the specified graphics state.
 void setName(PdfName value)
           
 void setSize(double value)
           
 
Methods inherited from class org.pdfclown.documents.contents.objects.Operation
get, getOperands, getOperator, toString, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Operator

public static final String Operator
See Also:
Constant Field Values
Constructor Detail

SetFont

public SetFont(PdfName name,
               double size)

SetFont

public SetFont(List<PdfDirectObject> operands)
Method Detail

getFont

public Font getFont(IContentContext context)
Gets the font resource to be set.

Parameters:
context - Content context.

getSize

public double getSize()
Gets the font size to be set.


scan

public void scan(ContentScanner.GraphicsState state)
Description copied from class: ContentObject
Applies this object to the specified graphics context, updating the specified graphics state.

Overrides:
scan in class ContentObject
Parameters:
state - Graphics state.

setSize

public void setSize(double value)
See Also:
getSize()

getName

public PdfName getName()
Description copied from interface: IResourceReference
Gets the resource name.

Specified by:
getName in interface IResourceReference<Font>
See Also:
IResourceReference.getResource(IContentContext), Resources

getResource

public Font getResource(IContentContext context)
Description copied from interface: IResourceReference
Gets the referenced resource.

Whether a resource name is available or not, it can be respectively either shared or private.

Specified by:
getResource in interface IResourceReference<Font>
Parameters:
context - Content context.

setName

public void setName(PdfName value)
Specified by:
setName in interface IResourceReference<Font>
See Also:
IResourceReference.getName()

PDF Clown
0.1.2

Project home page

Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.