xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathan wood <jonathanshaww...@gmail.com>
Subject Re: How do I superimpose one SVG image onto another?
Date Tue, 15 Jun 2010 21:52:28 GMT
my input svg dimensions are identical, unlike your inputs...you'll need to
adjust accordingly


On Tue, Jun 15, 2010 at 5:47 PM, jonathan wood
<jonathanshawwood@gmail.com>wrote:

>
> This should be pretty straightforward...
>
> given background.svg)
>
> <svg viewBox="0 0 308 308" xmlns:svg="http://www.w3.org/2000/svg" xmlns="
> http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
>    <rect width="308" height="308" fill="#112277"/>
> </svg>
>
>
> and foreground.svg
>
> <svg viewBox="-24 -24 356 356" xmlns:svg="http://www.w3.org/2000/svg"
> xmlns="http://www.w3.org/2000/svg" xmlns:xlink="
> http://www.w3.org/1999/xlink">
>  <rect width="308" height="308" fill="#772211"/>
> </svg>
>
>
> transcoding the following will produce the overlay
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="
> http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
>     <image x="0" y="0" width="308" height="308"
> xlink:href="background.svg"/>
>     <image x="0" y="0" width="308" height="308"
> xlink:href="foreground.svg"/>
> </svg>
>
>
>
>
>
> On Tue, Jun 15, 2010 at 9:35 AM, olivierk <okitenge@gmail.com> wrote:
>
>>
>> batik dom manipulation code :)
>> Our application generate various types of 2D barcodes in different formats
>> (BMP, JPG and PNG) and our clients have requested that we add support for
>> SVG.
>> I have looked at the "using Batik" section on Batik website but did not
>> find
>> any example of overlaying 2 images.
>>
>>
>> jonathan wood-3 wrote:
>> >
>> > do you need an xml representation or batik dom manipulation code?
>> >
>> >
>> > On Mon, Jun 14, 2010 at 10:18 AM, olivierk <okitenge@gmail.com> wrote:
>> >
>> >>
>> >> I have 2 SVG files I need to overlay. One file serve as the background
>> >> image
>> >> and is 308px by 308px while the second file (260px by 260px) is the
>> >> foreground image that must be centered (that is at the center of the
>> >> background image). I'd like the result of the operation to be saved in
>> a
>> >> third SVG file. Any suggestions?
>> >> Thanks,
>> >>
>> >> Olivier.
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/How-do-I-superimpose-one-SVG-image-onto-another--tp28880111p28880111.html
>> >> Sent from the Batik - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> >> For additional commands, e-mail:
>> batik-users-help@xmlgraphics.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/How-do-I-superimpose-one-SVG-image-onto-another--tp28880111p28891380.html
>> Sent from the Batik - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>>
>>
>

Mime
View raw message