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
splitting an image
by
Thaddy
[
Today
at 04:52:43 pm]
AI, NLP and CAI: Text Gen...
by
indydev
[
Today
at 04:51:00 pm]
Drawing grid lines on a t...
by
KodeZwerg
[
Today
at 04:30:06 pm]
Lazarus features in a non...
by
Laksen
[
Today
at 03:46:15 pm]
Parameter passing odditie...
by
KodeZwerg
[
Today
at 03:41:49 pm]
How to: create DLL file f...
by
KodeZwerg
[
Today
at 03:24:20 pm]
Web Applications with Pas...
by
Nate897
[
Today
at 03:17:43 pm]
Surf Units in Text Mode I...
by
mosquito
[
Today
at 01:58:21 pm]
Ho Ho Ho IntraWeb in Laza...
by
Thaddy
[
Today
at 01:55:52 pm]
Generics - correct syntax
by
Thaddy
[
Today
at 01:48:32 pm]
FpDebug questions
by
440bx
[
Today
at 01:22:53 pm]
leetcode doesn’t support ...
by
codeninja
[
Today
at 01:16:43 pm]
Can function be used for ...
by
Joanna
[
Today
at 12:48:19 pm]
Access violation when ope...
by
Чебурашка
[
Today
at 12:14:30 pm]
Access violation when re-...
by
Chris Osborne
[
Today
at 11:43:49 am]
how to tweek fpmake to co...
by
marcov
[
Today
at 10:35:11 am]
Why isn't TTIRadioGroup's...
by
egsuh
[
Today
at 08:09:35 am]
Lazarus for Windows on aa...
by
Wallaby
[April 23, 2024, 11:46:56 pm]
(Solved) TIndexedAVLTree ...
by
lainz
[April 23, 2024, 10:49:03 pm]
Demo Scene Picture sinwav...
by
KodeZwerg
[April 23, 2024, 10:26:21 pm]
fkInternalCalc
by
zraja
[April 23, 2024, 09:31:07 pm]
A fairly simple sound sol...
by
KodeZwerg
[April 23, 2024, 09:23:37 pm]
add new targets to make
by
marcov
[April 23, 2024, 08:38:42 pm]
Quirky windows
by
ASerge
[April 23, 2024, 07:07:16 pm]
[Request] Demo Scene Sub ...
by
Gigatron
[April 23, 2024, 06:29:39 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Gradients in svg files (Read 6344 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