Hi Theresa, FOP currently doesn't implement clip property. See compliance page at [1]. That said, there is a SGV alternative, try this (replacing XSLT variable with appropriate values):
<fo:instream-foreign-object width="100%" content-width="scale-to-fit"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{$clipWidthWithUnit}" height="{$clipHeightWithUnit}" viewBox="{$clipX} {$clipY} {$clipWidth} {$clipHeight}"> <clipPath id="myClip"> <rect x="{$clipX}" y="{$clipY}" width="{$clipWidth}" height="{$clipHeight}"/> </clipPath> <image clip-path="url(#myClip)" width="{$imageWidth}" height="{$imageHeight}" xlink:href="{$imageUrl}"/> </svg> </fo:instream-foreign-object> [1] http://xmlgraphics.apache.org/fop/compliance.html#fo-property-clip Le 13/12/2011 12:42, Theresa Jayne Forster a écrit : > Actually my question stems from 3 days of trying to find out what the > valid options for the <fo:external-graphic > clip parameter are > > > > I found > > > > Clip =”auto” > > Clip=” ‘path’ ‘M0 0 L 0 100 L 100 100 L 100 0 z’ ‘noscale’” > > > > Whereas in the end what I needed was in the block-container surrounding > it I needed to add overflow=”hidden” > > But I also want to clip stuff based on a path so I can have rounded > corners and such > > > > > > > Theresa Forster > > Senior Software Developer > > > > *From:*Luis Bernardo [mailto:[email protected]] > *Sent:* 13 December 2011 10:21 > *To:* [email protected] > *Subject:* Re: Is there a master reference for FOP functionality? > > > > > > Sorry, I think you probably meant FOP, not FO. Not everything in the > spec is implemented in FOP, and I don't think there is a document that > tells you what is implemented and what is not. Just by trying you will know. > > > > Luis > > On Tue, Dec 13, 2011 at 10:15 AM, Luis Bernardo <[email protected] > <mailto:[email protected]>> wrote: > > http://www.w3.org/TR/xsl/ > > > > > > On Tue, Dec 13, 2011 at 9:54 AM, Theresa Jayne Forster > <[email protected] <mailto:[email protected]>> wrote: > > I am trying to learn all the options available to FOP but there doesn’t > seem to be a reference that tells you everything, > > The w3schools XSL-FO reference tells you what parameters are available > to a call. For instance, external-graphic below. > > But what I cant find is what are the valid options for the properties, > ie clip in the example below. > > Is there a reference or list you can use for these? > > > > Kindest regards > > > > > Theresa Forster > > Senior Software Developer > > > > *XSL-FO external-graphic Object* > > > Syntax > > <fo:external-graphic> > <!-- > Contents:EMPTY > --> > </fo:external-graphic> > > > Properties > > *Property [A-J]* > > > > *Property [K-Z]* > > alignment-adjust > > > > keep-with-next <http://www.w3schools.com/xslfo/prop_keep-with-next.asp> > > alignment-baseline > > > > keep-with-previous > <http://www.w3schools.com/xslfo/prop_keep-with-previous.asp> > > azimuth <http://www.w3schools.com/xslfo/prop_azimuth.asp> > > > > language <http://www.w3schools.com/xslfo/prop_language.asp> > > background-attachment > <http://www.w3schools.com/xslfo/prop_background-attachment.asp> > > > > left <http://www.w3schools.com/xslfo/prop_left_right.asp> > > background-color <http://www.w3schools.com/xslfo/prop_background-color.asp> > > > > line-height <http://www.w3schools.com/xslfo/prop_line-height.asp> > > background-image <http://www.w3schools.com/xslfo/prop_background-image.asp> > > > > margin-bottom <http://www.w3schools.com/xslfo/prop_margin.asp> > > background-repeat > <http://www.w3schools.com/xslfo/prop_background-repeat.asp> > > > > margin-left <http://www.w3schools.com/xslfo/prop_margin.asp> > > background-position-horizontal > > > > margin-right <http://www.w3schools.com/xslfo/prop_margin.asp> > > background-position-vertical > > > > margin-top <http://www.w3schools.com/xslfo/prop_margin.asp> > > baseline-shift > > > > overflow > > block-progression-dimension > > > > padding-after <http://www.w3schools.com/xslfo/prop_padding.asp> > > border-after-color <http://www.w3schools.com/xslfo/prop_border_color.asp> > > > > padding-before <http://www.w3schools.com/xslfo/prop_padding.asp> > > border-after-style <http://www.w3schools.com/xslfo/prop_border_style.asp> > > > > padding-bottom <http://www.w3schools.com/xslfo/prop_padding.asp> > > border-after-width <http://www.w3schools.com/xslfo/prop_border_width.asp> > > > > padding-end <http://www.w3schools.com/xslfo/prop_padding.asp> > > border-before-color <http://www.w3schools.com/xslfo/prop_border_color.asp> > > > > padding-left <http://www.w3schools.com/xslfo/prop_padding.asp> > > border-before-style <http://www.w3schools.com/xslfo/prop_border_style.asp> > > > > padding-right <http://www.w3schools.com/xslfo/prop_padding.asp> > > border-before-width <http://www.w3schools.com/xslfo/prop_border_width.asp> > > > > padding-start <http://www.w3schools.com/xslfo/prop_padding.asp> > > border-bottom-color <http://www.w3schools.com/xslfo/prop_border_color.asp> > > > > padding-top <http://www.w3schools.com/xslfo/prop_padding.asp> > > border-bottom-style <http://www.w3schools.com/xslfo/prop_border_style.asp> > > > > pause-after <http://www.w3schools.com/xslfo/prop_pause.asp> > > border-bottom-width <http://www.w3schools.com/xslfo/prop_border_width.asp> > > > > pause-before <http://www.w3schools.com/xslfo/prop_pause.asp> > > border-end-color <http://www.w3schools.com/xslfo/prop_border_color.asp> > > > > pitch <http://www.w3schools.com/xslfo/prop_pitch.asp> > > border-end-style <http://www.w3schools.com/xslfo/prop_border_style.asp> > > > > pitch-range <http://www.w3schools.com/xslfo/prop_pitch-range.asp> > > border-end-width <http://www.w3schools.com/xslfo/prop_border_width.asp> > > > > play-during <http://www.w3schools.com/xslfo/prop_play-during.asp> > > border-left-color <http://www.w3schools.com/xslfo/prop_border_color.asp> > > > > relative-position > <http://www.w3schools.com/xslfo/prop_relative-position.asp> > > border-left-style <http://www.w3schools.com/xslfo/prop_border_style.asp> > > > > richness <http://www.w3schools.com/xslfo/prop_richness.asp> > > border-left-width <http://www.w3schools.com/xslfo/prop_border_width.asp> > > > > right <http://www.w3schools.com/xslfo/prop_left_right.asp> > > border-right-color <http://www.w3schools.com/xslfo/prop_border_color.asp> > > > > role <http://www.w3schools.com/xslfo/prop_role.asp> > > border-right-style <http://www.w3schools.com/xslfo/prop_border_style.asp> > > > > scaling > > border-right-width <http://www.w3schools.com/xslfo/prop_border_width.asp> > > > > scaling-method > > border-start-color <http://www.w3schools.com/xslfo/prop_border_color.asp> > > > > script > > border-start-style <http://www.w3schools.com/xslfo/prop_border_style.asp> > > > > source-document <http://www.w3schools.com/xslfo/prop_source-document.asp> > > border-start-width <http://www.w3schools.com/xslfo/prop_border_width.asp> > > > > space-end > > border-top-color <http://www.w3schools.com/xslfo/prop_border_color.asp> > > > > space-start > > border-top-style <http://www.w3schools.com/xslfo/prop_border_style.asp> > > > > speak <http://www.w3schools.com/xslfo/prop_speak.asp> > > border-top-width <http://www.w3schools.com/xslfo/prop_border_width.asp> > > > > speak-header <http://www.w3schools.com/xslfo/prop_speak-header.asp> > > bottom <http://www.w3schools.com/xslfo/prop_top_bottom.asp> > > > > speak-numeral <http://www.w3schools.com/xslfo/prop_speak-numeral.asp> > > clip > > > > speak-punctuation > <http://www.w3schools.com/xslfo/prop_speak-punctuation.asp> > > content-height > > > > speech-rate <http://www.w3schools.com/xslfo/prop_speech-rate.asp> > > content-type > > > > src > > content-width > > > > stress <http://www.w3schools.com/xslfo/prop_stress.asp> > > country <http://www.w3schools.com/xslfo/prop_country.asp> > > > > text-align > > cue-after <http://www.w3schools.com/xslfo/prop_cue.asp> > > > > text-indent > > cue-before <http://www.w3schools.com/xslfo/prop_cue.asp> > > > > top <http://www.w3schools.com/xslfo/prop_top_bottom.asp> > > display-align > > > > voice-family <http://www.w3schools.com/xslfo/prop_voice-family.asp> > > dominant-baseline > > > > volume <http://www.w3schools.com/xslfo/prop_volume.asp> > > elevation <http://www.w3schools.com/xslfo/prop_elevation.asp> > > > > width > > height <http://www.w3schools.com/xslfo/prop_height.asp> > > > > > > id <http://www.w3schools.com/xslfo/prop_id.asp> > > > > > > inline-progression-dimension > > > > * * > > > > > > > > > -- Pascal --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
