Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
FPvectorial
»
Gradients in svg files
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Assign (textfile) not com...
by
Bart
[
Today
at 11:35:37 am]
Warning: Source OS Redefi...
by
Laksen
[
Today
at 11:32:46 am]
[SOLVED] how to see what ...
by
Laksen
[
Today
at 11:30:25 am]
Slow copying of small str...
by
alpine
[
Today
at 11:25:10 am]
assembler name is longer ...
by
Key-Real
[
Today
at 11:15:20 am]
Question for people who h...
by
BrassGear
[
Today
at 11:12:50 am]
I just released a commerc...
by
BrassGear
[
Today
at 11:05:12 am]
How to: create DLL file f...
by
KodeZwerg
[
Today
at 10:53:20 am]
Text orientation in TMemo...
by
wp
[
Today
at 10:27:54 am]
InstallAware Using Lazaru...
by
marcov
[
Today
at 10:05:26 am]
Linux Workspaces -- StayO...
by
AmatCoder
[
Today
at 08:21:27 am]
Demoscene The Champs Crac...
by
Lulu
[
Today
at 08:15:12 am]
Azure sql database will n...
by
paweld
[
Today
at 07:24:47 am]
Find child controls by na...
by
Handoko
[
Today
at 04:17:05 am]
location of non visual co...
by
VisualLab
[April 17, 2024, 11:58:55 pm]
For-in loop over constant...
by
Joanna
[April 17, 2024, 11:57:15 pm]
Lazarus editor feature re...
by
440bx
[April 17, 2024, 11:49:08 pm]
How would you define a fi...
by
wp
[April 17, 2024, 11:04:00 pm]
Directx9 with mylogo insi...
by
KodeZwerg
[April 17, 2024, 11:03:54 pm]
Lazarus for Windows on aa...
by
Wallaby
[April 17, 2024, 10:25:46 pm]
[SOLVED] TDbf table, Leve...
by
1HuntnMan
[April 17, 2024, 10:03:16 pm]
Doomed name
by
Martin_fr
[April 17, 2024, 09:09:52 pm]
lazarus-project_3.2.0-0_a...
by
midigark
[April 17, 2024, 06:09:40 pm]
TBGRABitmap.TextSize retu...
by
circular
[April 17, 2024, 05:24:04 pm]
BUG REPORT: Unable to gen...
by
gasensor
[April 17, 2024, 05:10:20 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Gradients in svg files (Read 6324 times)
pgarcia
Newbie
Posts: 1
Gradients in svg files
«
on:
November 04, 2013, 12:32:16 pm »
Hi, FPvectorial don't work for svg gradients or is something grong in my code?
procedure TForm1.Button1Click(Sender: TObject);
var
Vec: TvVectorialDocument;
page: TvVectorialPage;
ts: TStringList;
begin
ts := TStringList.Create();
ts.Add('<svg xmlns="
http://www.w3.org/2000/svg
" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none">');
ts.Add('<linearGradient id="g348" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="100%" y2="100%"> ');
ts.Add('<stop stop-color="#FFFFFF" offset="0"/><stop stop-color="#E3A820" offset="1"/>');
ts.Add('</linearGradient> ');
ts.Add('<rect x="0" y="0" width="1" height="1" fill="url(#g348)" />');
ts.Add('</svg> ');
Vec := TvVectorialDocument.Create;
try
Image1.Canvas.Brush.Color := clWhite;
Image1.Canvas.FillRect(0, 0, Image1.Width, Image1.Height);
vec.ReadFromStrings(ts, vfSVG);
page := vec.GetCurrentPageAsVectorial;
page.DrawBackground(image1.canvas);
page.Render(image1.Canvas, 0, image1.Height, 40, -40);
image1.Invalidate;
finally
Vec.Free;
end;
end;
This code is called form the onclick of a tbutton and image1 is a TImage.
Thanks for the responses in advance
Logged
felipemdc
Administrator
Hero Member
Posts: 3538
Re: Gradients in svg files
«
Reply #1 on:
December 27, 2014, 07:55:01 pm »
Hello, I'm working in supporting gradients, but they are quite complex....
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
FPvectorial
»
Gradients in svg files
TinyPortal
© 2005-2018