devexpress pdf viewer asp.net mvc : Extract one page from pdf reader SDK application service wpf windows asp.net dnn Artefact1-part914

1.5 Elements
PDFFormattedTextElement
PDFParagraphElement
PDFArrowElement
PDFDoubleArrowElement
PDFCellElement
PDFDataTableElement
PDFDataTableWithColumnsCaptionElement
PDFDataTableWithRowsCaptionElement
Each
PDFElement
hasasetofpropertiesthatdefineitsappearance(text
color,font,dots,etc).Thesepropertiesaregroupedinastylesheetowned
byeachelement.Everyelementcontrolsitsownappearanceanddoesn’taf-
fectotherelements.ThisisincontrasttomanyPDFframeworksthatusea
flowlogic.Thisbehaviorallowsyoutomoveanelementaroundorevenuse
thesameelementinmultiplepagesordocuments.
ComposingandPlacement
Artefact’selementshaveagenericbehaviorthatmanagestheirlocationon
apageaswellastheirdimensions.TheArtefactcoordinatesystemisusedto
placecomponents.Valuescanbeexpressedinseveralunitssuchasmm,cm
orinch.Theoriginofthecoordinatesystemisthetopleftofapage.
ElementPositioning
Sendingthemessage
from:
totheclassofanelementinstantiatesitandsets
itsposition.Thefollowingexamplecreatesa
PDFTextElement
andplacesit
at15mmfromtheleftborderand30mmfromthetop
PDFTextElement from: 15 mm @ @ 30 0 mm
Inaddition,Artefactoffersotherconstructorsthatfixthepositionandsize
oftheelement,andwepresentthemnext.
ElementSize
Artefactofferstwowaystosetthesizeofanelement:eitherthroughthe
from:to:
messageorthrough
from:dimension:
.
Themessage
from:to:
takesasargumentsthestartandtheendposition.
Forexample,thefollowingcodedrawsarectanglewhoseoriginis15mm
fromtheleftand30mmfromthetopanditsendisat90mmfromtheleft
borderand80mmfromthetopofthepage:
11
Extract one page from pdf reader - SDK application service:C# PDF Page Extract Library: copy, paste, cut PDF pages in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Easy to Use C# Code to Extract PDF Pages, Copy Pages from One PDF File and Paste into Others
www.rasteredge.com
Extract one page from pdf reader - SDK application service:VB.NET PDF Page Extract Library: copy, paste, cut PDF pages in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Detailed VB.NET Guide for Extracting Pages from Microsoft PDF Doc
www.rasteredge.com
GeneratePDFDocumentswithArtefact
PDFRectElement from: 15 mm @ @ 30 0 mm to: : 90 0 mm m @ @ 80 0 mm
Themessage
from:dimension:
,takesasargumentsthestartpositionand
thesizeofthecomponent.Forexample,thefollowingcodesetsthesizeof
thecomponenttobe50by40millimeters.
PDFRectElement from: 15mm @ @ 30 0 mm m dimension: 50mm @ @ 40mm
Themessages
width
and
height
returnthewidthandheightofthecompo-
nent.
SimpleElements
Thepackage
Artefact-Core-Elements-Basic
containselementarycom-
ponents.Therearegroupedinthreecategories:text,images,andgeometric
forms.
TextandImages
Towritetextonapage,useinstancesof
PDFTextElement
.Themethod
text:
setsthetexttobedisplayed.Theclassmethod
from:text:
supportsposi-
tioningandtextdefinition.
PDFTextElement from: 15mm @ @ 30mm text: 'hello!'
Usingthe
PDFJpegElement
class,imagesinJPEGformatcanalsobeinserted
inadocument,usingthe
fromStream:
and
from:dimension:fromStream:
classmessages.Themessages
width:
and
height:
setthesizeoftheimage
whilerespectingitsoriginalaspectratio.
ThefollowingexamplegeneratesaPDFdocumentwithonepage.Thispage
containsoneimageplacedattwodifferentlocations.Inthefirstcase,the
imageis80mminwidthand30mminheight.Inthesecondcase,thewidthis
80mmandtheheightisautomaticallycomputedkeepingtheoriginalimage
ratio.
| pdf page |
pdf := = PDFDocument new.
page := PDFPage new.
page add: : (
PDFJpegElement
from: 10 0 mm m @ @ 10 0 mm
dimension: 80 0 mm m @ @ 30 0 mm
fromStream: (FileStream fileNamed:
'/home/enterprise/image.jpg')).
page add: : ((
PDFJpegElement
fromStream: (FileStream fileNamed:
'/home/enterprise/image.jpg'))
from: 10 0 mm m @ @ 50 0 mm; width: 80 0 mm).
pdf add: page;
12
SDK application service:VB.NET PDF Page Delete Library: remove PDF pages in vb.net, ASP.
If you are looking for a solution to conveniently delete one page from your PDF document, you can use this VB.NET PDF Library, which supports a variety of PDF
www.rasteredge.com
SDK application service:C# PDF File Merge Library: Merge, append PDF files in C#.net, ASP.
C# developers can easily merge and append one PDF document to document imaging toolkit, also offers other advanced PDF document page processing and
www.rasteredge.com
1.5 Elements
pdf exportTo: (FileStream forceNewFileNamed:
'/home/enterprise/image.pdf')
GeometricShapes
Artefacthasthefollowingcomponentsforgeometricshapes:
Theclass
PDFLineElement
drawsalineusing
from:to:
.
PDFLineElement from: 15mm @ @ 30mm to: : 90mm@170mm
Theclassmessage
from:angle:length:
drawsalinewiththegivenstart
position,angleandlength.
PDFLineElement from: 10mm @ @ 20mm angle: 70 0 length: : 50mm
Theclass
PDFRectElement
representsarectangle.Twomessagesarerele-
vant:
from: dimension:
and
from: to:
.Thetwofollowingexamplesare
equivalent:
PDFRectElement from: 10 0 mm@10mm m dimension: 100 mm m @ 30 mm.
PDFRectElement from: 10mm@10mm to: 110mm@40mm
Theclass
PDFPolygonElement
drawspolygons.Todefineapolygon,weset
thestartpointandaseriesofpointsusingthemessage
from:points:
.
PDFPolygonElement
from: 10mm@10mm
points: { 30mm@30mm . . 15mm@40mm m . . 5mm@20mm m }
Circlesaredefinedwiththeclass
PDFCircleElement
andusingthemessage
center:radius:
.
PDFCircleElement center: : 100mm@100mm radius: : 50mm
Beziercurvesarerepresentedbytheclass
PDFBezierCurveElement
and
definedusingthemessage
from:points
.
PDFBezierCurveElement
from: 10mm@50mm
points: { 0mm@0mm. 100mm@20mm. 150mm@0mm. 50mm@50mm }
CompositeElements
Artefactcomeswitharichsetofhigh-levelcomponents,groupedinthe
package
Artefact-Core-Elements-Composites
.Thesecomponentsare
theresultoftheassemblyofsinglecomponentsandotherhigh-levelcompo-
nents.Theyareusedtocreatelayoutsandcomplexcontentswithminimal
codingandahighdegreeofreuse.Thesecomponentscanbeusedinseveral
differentapplicationsandmaterials.Theyaredividedinthreeareas:man-
agementoftext,drawingarrowsandreporting.
13
SDK application service:C# PDF Image Extract Library: Select, copy, paste PDF images in C#
Open a document. PDFDocument doc = new PDFDocument(inputFilePath); PDFPage page = (PDFPage)pdf.GetPage(0); // Extract all images on one pdf page.
www.rasteredge.com
SDK application service:VB.NET PDF File Merge Library: Merge, append PDF files in vb.net
all. This guiding page will help you merge two or more PDF documents into a single one in a Visual Basic .NET imaging application.
www.rasteredge.com
GeneratePDFDocumentswithArtefact
AdvancedText
Sofaryouhaveusedtheclass
PDFTextElement
toplacetextonapage.This
componentislimitedintermsoffunctionalitysinceitonlyhandlestheposi-
tiononthepage.Inadditiontothis,Artefactoffersthreehigh-levelcompo-
nentsthatsupportadvancedfeatures:
PDFFormatedTextElement
,
PDFCel-
lElement
and
PDFParagrapElement
.
Thecomponent
PDFFormatedTextElement
issimilarto
PDFTextElement
but
includesmanagingthealignment(left,center,right).A
PDFCellElement
isa
PDFFormatedTextElement
withaborder.Finally,a
PDFParagraphElement
allowstheinsertionofaparagraphoftextandautomaticallymanagesthe
breaksattheendoflines.
DrawingArrows
Arrowsareveryusefulforgeneratingsketchesanddiagrams.Thecompo-
nent
PDFArrowElement
drawsanarrowwithatipatitsend.Thecomponent
PDFDoubleArrowElement
drawsatipatbothextremities.
PDFArrowElement from: 10mm@10mm m to: 100mm@30mm
PDFDoubleArrowElement from: 10mm@80mm to: : 100mm@150mm
ReportCreation
Componentsinheritingfrom
PDFDatatable
aretheperfectillustrationof
thepowerandcomfortprovidedbythecompositeelementsofArtefact.With
thesedatatables,youcanquicklygeneratereportsandcustomizethemto
yourneeds.
Withtheclass
PDFDataTableElement
youdefineareportwithspecificdi-
mensionsonthepageandshowingagivendataset.Thedataisorganizedin
atabularmanner:areportcontainsanumberofrows,eachrepresentinga
lineofthereport.
PDFDataTableElement new
data: #(
#('Smith' 'Peter' 43)
#('Jones' 'Mickael' ' 25)
#('washington' 'robert' ' 30) );
from: 10mm @ @ 20mm;
dimension: 150mm @ @ 60mm
Thesubclass
PDFDataTableWithColumnsCaptionElement
extendsthetable
behaviortosupportcaptions.Themessage
captions:
takesanarrayasar-
gument,whichcontainsthetitleofeachcolumnofyourreport.Itisimpor-
tanttonotethatthenumberofcolumnheadingsshouldbethesameasthe
numberofcolumnsandeachlinemusthavethesamenumberofcolumns.
14
SDK application service:VB.NET PDF Annotate Library: Draw, edit PDF annotation, markups in
to display it. Thus, PDFPage, derived from REPage, is a programming abstraction for representing one PDF page. Annotating Process.
www.rasteredge.com
SDK application service:C# PDF Page Delete Library: remove PDF pages in C#.net, ASP.NET
Using RasterEdge Visual C# .NET PDF page deletion component, developers can easily select one or more PDF pages and delete it/them in both .NET web and Windows
www.rasteredge.com
1.5 Elements
PDFDataTableWithColumnsCaptionElement new
captions: #('Name' 'Surname' ' 'Age');
data: #(
#('Smith' 'Peter' 43)
#('Jones' 'Mickael' ' 25)
#('washington' 'robert' ' 30)
);
from: 10 0 mm m @ @ 20 0 mm;
dimension: 150 0 mm m @ @ 60 0 mm
FinallyArtefactalsoprovidesa
PDFDataTableWithRowsCaptionElement
subclass,whichisavariantof
PDFDataTableWithColumnsCaptionElement
.
Itsbehaviorisdifferentsincethecaptionisusedtogiveatitletoeachline.
Inthiscase,thetablegivenasargumenttothe
caption:
messagemusthave
anumberofelementsequaltothenumberofrows.
Lastly,
PDFDataTableElement
offersacallbackmechanismdefinedbythe
message
customizationBlock:
.Theassociatedblockisactivatedforthe
drawingofeachcell.Ittakesfourparametersthatarethecellbeingdrawn,
theverticalandhorizontalpositionofthecellinthetableandthedatapre-
sentedinthecell.Usingablockofcode,itisthenpossibletochangetheap-
pearanceofthetableortotriggerspecialtreatment.
Thefollowingexampleshowsauseofthe
customizationBlock:
message.
Theblockreplacestheageofapersonbythetext
'Older than 30'
ifthe
personisolderthanthirty.Notethattheblockonlyconsidersthethirdcell
ofeachlineandexcludesthetitleofeachcolumn.
(PDFDataTableWithColumnsCaptionElement new
captions: #('Name' 'Surname' ' 'Age');
data: #(
#('Smith' 'Peter' 43)
#('Jones' 'Mickael' ' 25)
#('washington' 'robert' ' 30)
);
from: 10 0 mm m @ @ 20 0 mm;
dimension: 150 0 mm m @ @ 60 0 mm;
customizationBlock: [ [ :cell :x x :y y :data |
(x = = 3 and: [ [ y y > 1 1 ]) ) ifTrue: : [
(data > > 30) ) ifTrue: : [ [ cell text: 'Older r than n 30' ]
]
])
CompositeelementsbringalotofflexibilitytoPDFdocumentcreation.Ob-
viously,thedefaultonesdonotcoverallneedsandyouwillmostlikelyneed
tocreateyourowncomponents.Wesuggesttostudytheexistingonestosee
howtoproceed.
15
SDK application service:VB.NET PDF copy, paste image library: copy, paste, cut PDF images
how to copy an image from one page of PDF how to cut image from PDF file page by using doc As PDFDocument = New PDFDocument(inputFilePath) ' Extract all images
www.rasteredge.com
SDK application service:C# PDF: C# Code to Process PDF Document Page Using C#.NET PDF
Able to separate one PDF file into two PDF documents using C#.NET programming code; Free to extract page(s) from source PDF file and combine extracted pages
www.rasteredge.com
GeneratePDFDocumentswithArtefact
1.6 StylesheetsforNewbies
A
PDFStyleSheet
isadictionarythatcontainsrenderingproperties,e.g.
thecolororthefontforpiecesoftext.Followingthesamelogicforpages
andelements,astylesheetcanbereusedacrossdifferentelementsordocu-
ments.Whendocumentsarecreated,theyareautomaticallygivenadefault
stylesheetthatthenappliestotheirelements.Consequently,youdon’thave
tospecifyeveryrenderingpropertyfortheelementsofadocument.
Followingthehierarchylogic,astylesheetdefinedatalowerlevelofadoc-
umentwilloverridepropertiessetatahigherlevel.Forexample,ifyoude-
fineatextColorinthedocumentstylesheet,everypieceoftextwillbewrit-
teninthatcolorexceptforelementswheretextColorisdefinedintheirown
stylesheet.
Artefactalsoincludesadictionaryofstylesthatallowsevery
PDFElement
tobegivenaspecific,namedstyle.Forexamplethecodebelowisgiventhe
#title
style.
PDFText from: : 10mm@15mm m text: 'My title' style: : #title
Atanyupperlevel(document,page,etc),youcandefinethenamedstyle
usingthemessage
>
,e.g.asfollows:
myDocument stylesheet > #title
at: #font
put: PDFCourierFont size: 32 2 pt
Themessage
>
givesaccesstothestyleattributeof
PDFStyleSheet
.Herewe
specifythe
#title
attributeofthedocument.
StylesheetElements
Definingastylesheetallowsonetospecifyspecificpresentationattributes
forasetofelements.Theseattributescanalsobesetdirectlyforanelement.
Weshowherethedifferentattributesandhowtosetthemforanelement.
Fonts
ArtefactsupportsintegratedPDFfontsthroughdifferentsubclassesof
PDF-
Font
:
PDFCourierFont
,
PDFHelveticaFont
,
PDFSymbolFont
,
PDFTimesFont
and
PDFZapfdingbatsFont
.ThesefontsareavailableinanyPDFviewer.A
PDFFont
instancesupportsthebasicstyles
bold
and
italic
.
Assaidabove,fontscanbesetdirectlyforapieceoftext,whichisshown
below:
PDFText
from: 10mm@15mm
text: 'My y title'
font: ((PDFTimesFont t size: 24 pt) ) bold).
16
1.6 StylesheetsforNewbies
Theclass
PDFFont
offerstwoextremelyusefulmessageswhencreatinga
document:
getStringWidth:
and
getIdealFontSizeForTheString:width:
.
Withthemessage
getStringWidth:
yougetthewidthofastringcalculated
basedontheattributesofthefontused.Forexample,thefollowingexample
returnsthewidthofthestring
'hello'
inCouriermeasuring20points:
(PDFCourierFont size: : 20 0 pt) ) getStringWidth: 'hello'
Themessage
getIdealFontSizeForTheString:width:
returnstheoptimal
sizefortheusedfontbasedonthedesiredwidth.Thefollowingexamplede-
terminestherequiredsizeforaCourierfonttodisplaythe
'Hello'
textif
thewidthshouldbe15cm:
(PDFCourierFont new)
getIdealFontSizeForTheString: 'hello' width: : 15 5 cm
Dots
Allgeometricshapescanuseadottedstyle.ItisdefinedbyaPDFDottedob-
jectthatspecifiesthelengthofeachlinesegmentandthespacebetween
them,asshownbelow:
((PDFArrowElement from: 125 mm m @ @ 40 0 mm m to:
100 mm m @ @ 80 0 mm)
dotted: (PDFDotted new w length: : 2 2 mm; ; space: : 3 3 mm)).
ColorsandShadesofGray
Colorsandshadesofgrayarerepresentedbytheclass
PDFColor
.Todefine
acolor,ArtefactusesthetraditionalRGBschemawheretheratioofeach
colorisexpressedusingavaluefrom0to255.Adeepblackcorrespondsto
thetriple(0,0,0),thecolorredto(255,0,0),thecolorgreento(0,255,0),blue
to(0,0,255)andwhiteto(255,255,255).Grayscalesareexpressedwithasin-
glevaluerangingfrom0to255.Avalueof0correspondstowhite,whilethe
valueof255isequivalenttoblack.
Tospecifythecolororgrayscaleused,themessages
drawColor:
,
fill-
Color:
,and
textColor:
areused.Theyrespectivelymanagethedrawing
color,fillcolorandtextcolor.
Forexample,thefollowingcodedrawsarectanglewhoseborderwillbeblue
andwillhavearedfill:
PDFRectElement new
from: 10 0 mm m @ @ 10 0 mm;
dimension: 100 0 mm m @ @ 30 0 mm;
fillColor: (PDFColor r r: 255 5 g: : 0 0 b: : 0);
drawColor: (PDFColor r r: 0 g: : 0 0 b: : 255).
Thecodebelowproducesagraypieceoftext:
17
GeneratePDFDocumentswithArtefact
PDFTextElement new
textColor: (PDFColor r greyLevel: 128);
from: 10 0 mm m @ @ 50 0 mm;
text: 'A A text in n blue';
DrawingThickness
Thethicknessofaline,asegment,oraborder,iscontrolledbythemessage
thickness:
,asshownbelow:
(PDFRectElement from: : 10 0 mm m @ @ 10 0 mm m dimension: 50 0 mm m @ @ 50 0 mm)
thickness: 2 2 mm
Alignment
Textalignmentismanagedusingthe
PDFAlignment
class.Textcanbealigned
left,centerorright.Messagesare
left
,
center
and
right
.Thefollowing
examplecreatesaright-alignedtext:
(PDFFormattedTextElement from: 0 0 mm m @ @ 0 mm m dimension: 100 mm m @ 10 mm)
alignment: (PDFAlignment t right);
text: 'At t right!'
AbstractingaStyle
Adocumentisassociatedtoadefaultstylesheetwhosepropertiesareapplied
toanyelementthatdoesnotspecifyitsownproperties.Forexample,ifyou
createa
PDFTextElement
withoutsettingafontandtextcolor,thecolorof
textandthefontssetinthedocumentwillbeused.
ThedefaultstylesheetisalwaysfilledupbyArtefactwithsensibledefaults.
That’swhyyoudidnothavetospecifyvaluesofstyleinthepreviousex-
amples.Youcanaccessthestylesheetusingthemessage
styleSheet
.To
changethevaluesofthedefaultstyle,yousimplychangethepropertiesof
thestylesheet,forexampleasfollows:
myDocument := = PDFDocument new.
myDocument styleSheet
textColor: (PDFColor r r: 0 g: : 100 b: : 200);
font: (PDFHelveticaFont t size: 32pt) italic.
Artefactstylesformatree.Eachsubstylepointstoitsparentandtherootof
stylesisthedefaultstyleattachedtothedocument.Thiswaypropertiescan
becustomizedanddefaultbehaviorcanbereusedwhenneeded.
StylesheetApplication
Oftenyouwanttoapplyastyletoasetofelementsbutnottoalltheele-
mentsofadocument.Assaidabove,Artefactallowsyoutodefineanamed
18
1.6 StylesheetsforNewbies
styleandapplyittotheelementsthatshouldfollowthiscustomstyle.
Forexample,thatyouwanttouseacertainfontandstyleforsometextele-
mentorquotes,youcandefineastylenamed
#quote
asfollows:
myDocument := = PDFDocument new.
myDocument styleSheet > #quote
textColor: (PDFColor r r: 0 g: : 50 0 b: 200);
font: (PDFCourierFont size: 8pt) italic.
Thisstyleisdefinedhereasthesub-documentstyleanditwillbeappliedto
allelementsofthatusethe
#quote
style.Inthefollowingexampleweassign
the
#quote
styletoapieceoftextusingthemessage
style:
.
(PDFTextElement from: 5cm m @ @ 5cm)
text: 'my y Quote with the quote style'; ; style: : #quote
Intheaboveexample,weonlyhaveonelevelofstyles.However,Artefact
supportsaninfinitelevelsofstyles.Thisbehaviorisessentialforcompos-
iteelementswherethenestingoftheelementsimpliesthenestingoftheir
styles.
Forexample,belowwecreateadatatablewithatitleforeachcolumn.
(PDFDataTableWithColumnsCaptionElement
from: 10 0 mm m @ @ 20 0 mm m dimension: 190 mm @ @ 60 0 mm)
captions: #('Name' ' 'Surname' ' 'email');
data: #(
#('Smith' 'Peter' 'peter.smith@mail.org')
#('Jones' 'Mickael' 'mickael.jones@epr.com')
#('washington' 'robert' 'robert.washington@blif.com'));
style: #dataTableWithColoredCaption;
yourself).
PDFDataTableWithColumnsCaptionElement
isacompositeelement.This
elementusesasstylesofitssub-elements
#cell
and
#caption
,respectively
forcaptionsandcells.Byusingthespecialisationbasedonstylenesting,it
isthenpossibleatouseastyleuniquelyforthistable,inthiscaseitwillbe
#dataTableWithColoredCaption
Todefinethisstyle,thesecondexpressionbelow=accessthecaptionstyleof
the
dataTableWithColoredCaption
style,andthencustomizesit.
pdfdoc := = PDFDocument t new.
pdfdoc styleSheet > > #dataTableWithColoredCaption n > #caption
fillColor: (PDFColor r r: 158 8 g: : 158 b: 79);
drawColor: (PDFColor r r: 158 8 g: : 158 b: 79).
pdfdoc styleSheet > > #dataTableWithColoredCaption n margin: 4 4 pt.
pdfdoc styleSheet > > #dataTableWithColoredCaption n > #cell
alignment: PDFAlignment right.
Hereweseethatwecanchangeanestedelementattribute:wechangethe
alignmentofacellinthetableusingasequenceof
>
messages.Styleman-
19
GeneratePDFDocumentswithArtefact
agementbringsalotofflexibilityfortheproductionofadocument.Itsep-
aratesthepresentationappearancefromthecomponentdefinition.This
distinctionbetweenstructureandpresentationallowsuserstoeasilycreate
theirowncomponentsjustascustomizableasthoseprovidedwithArtefact.
1.7 CreateyourownPDFCompositeElements
ThespiritofArtefactistoreducethecomplexityofpdfgeneration.When
youhavetocreateadocument,agoodideaistoavoidwastingtimerein-
ventingthewheel.Whenyoucreateacompositeelement,ifyourcomponent
isbasedaroundastring,inheritfrom
PDFCompositeText
.Otherwise,your
componentshouldbeasubclassof
PDFComposite
.
Inthistutorialwewillcreateaclock,whichisbasicallyacircleandtwoar-
rows.Theseelementswillbedrawndependingontheprovidedtimeand
properties(size,colors,thickness).
ClockCreation
Firstcreatetheclassofyourelementandgenerateaccessorsforitsvariable
time
thatwillcontainthetimetodisplay.
PDFComposite subclass: #PDFClockElement
instanceVariableNames: 'time'
classVariableNames: ''
category: 'Artefact-Tutorial'
ThetworelevantmethodsforArtefactare
defaultStyle
and
getSubEle-
mentsWith:styleSheet:
.Thefirstonemustreturnacollectionof
PDFEle-
ments
(basicorcomposites).Thesecondonemustreturnasymbolthatas-
sociatestheelementswithastyledefinition.Howeverit’snotnecessaryto
definethisstyleinyourdocument,Artefactwillusethedefaultstyleinstead.
Definethedefaultstyle:
PDFClockElement>>defaultStyle
^ #clock
Thendefinethemethodthatwilldrawtheclock.Asafirstapproximation,
thismethodjustreturnsacircle:
PDFClockElement>>getSubElementsWith: aGenerator styleSheet:
aStyleSheet
^ { PDFCircleElement from: self from to: self to }
Thecirclewillbedrawndependingonthiscompositepositionandsize.We
areusing
from: to:
forthecircleinsteadof
center:radius:
becauseit’s
easierforustocreateaclockusingtheboundaryboxofthecircle.
20
Documents you may be interested
Documents you may be interested