OpenMP support for Clang
by Samuel Chase
Hello Inkscape Developers,
I just came across this: http://clang-omp.github.io/ .
I guess once this makes it into Clang, we'll be able to create fully
featured (i.e. OpenMP support enabled) Inkscape builds with clang++.
Haven't tested anything so far, but this is still an interesting development...
Samuel
9 years, 9 months
Fix for #771957: interleaved text and graphics in pdf+latex output
by David R. Bild
The current implementation of pdf+latex renders all text objects (LaTeX) above all graphical objects (PDF). I needed to export a figure with text
interleaved with graphics---essentially bug #771957---so I implemented a simple fix for it.
I'd like to see this (or, more likely, a modified version) merged for 0.49, but I'm not sure who maintains the pdf+latex renderer. Please let me know
how to help.
The code is at https://code.launchpad.net/~drbild/inkscape/multilayer-pdf-latex-output
-- David
--
David R. Bild
Graduate Student
EECS Department
University of Michigan
1301 Beal Ave.
Ann Arbor, MI 48109
9 years, 9 months
Fwd: Modifications to RecolorWheelPrivate
by Arshdeep Singh
---------- Forwarded message ----------
From: Arshdeep Singh <moduli16@...400...>
Date: Mon, Aug 26, 2013 at 1:22 PM
Subject: Modifications to RecolorWheelPrivate
To: Ted Gould <ted@...11...>, Krzysztof Kosiński <tweenk.pl@...400...>
Hi,
I added a map object by the name 'nodes' to RecolorWheelPrivate:
std::map<std::string,RecolorWheelNode> nodes;
I then added this snippet for painting recolor nodes from the map:
for (std::map<std::string,RecolorWheelNode>::iterator iter =
priv->nodes.begin(); iter != priv->nodes.end(); ++iter)
{
dist = (*iter).second._color[1] * outer ;
xx = center_x + cos ((*iter).second._color[0] * 2.0 * G_PI) * dist;
yy = center_y - sin ((*iter).second._color[0] * 2.0 * G_PI) * dist;
(*iter).second.x = (gfloat)xx;
(*iter).second.y = (gfloat)yy;
r = (*iter).second._color[0];
g = (*iter).second._color[1];
b = (*iter).second._color[2];
hsv_to_rgb (&r, &g, &b);
}
I added this snippet to performUpdate() in the recolor-artwork-widget.cpp :
void RecolorArtworkWidget::performUpdate()
{
if ( update || !desktop ) {
return;
}
if ( dragId ) {
// local change; do nothing, but reset the flag
g_source_remove(dragId);
dragId = 0;
return;
}
update = true;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
GSList const *items = NULL;
//int selObj = 0;
if ( selection )
{
items = selection->itemList();
//selObj = g_slist_length (const_cast<GSList*>(items));
RecolorWheel* wheel = (RecolorWheel*)
(((RecolorWheelSelector*)(rsel))->getWheel()) ;
RecolorWheelNode temp;
for (GSList const *i = items; i != NULL; i = i->next)
{
SPObject *obj=reinterpret_cast<SPObject *>(i->data);
Inkscape::XML::Node* obj_repr = obj->getRepr();
SPCSSAttr* obj_css = sp_repr_css_attr( obj_repr , "style" );
guint32 rgb32 = sp_svg_read_color( sp_repr_css_property(
obj_css, "fill", "#ababab") , 0xF0F8FF );
SPColor color = SPColor (rgb32);
float rgb[3] , hsv[3];
sp_color_get_rgb_floatv (&color, rgb);
sp_color_rgb_to_hsv_floatv (hsv , temp._color[0] ,
temp._color[1] , temp._color[2] );
add_node_to_recolor_wheel (wheel, obj->getId() , temp );
}
}
update = false;
}
There seems to be some runtime error. Opening the RecolorArtwork Dialogbox
crashes inkscape. Running gdb shows the warning that "HEAP: Free heap block
a90b8f6 modified at a90b8f6 after it was freed" .
Can't figure out whats making the application to crash.
I have uploaded this branch too. It is the latest revision.
--
Arshdeep Singh
Third Year, Computer Engineering
Delhi Technological University
Ph: +91-9654115614
https://sites.google.com/site/adsingh1729/home
--
Arshdeep Singh
Third Year, Computer Engineering
Delhi Technological University
Ph: +91-9654115614
https://sites.google.com/site/adsingh1729/home
9 years, 9 months
[Units] Analysis of SVG Units
by Matthew Petroff
Sorry for my recent lack of updates. I was out of the country without a
computer for a little over a week, was further delayed by a flight
cancellation, and just got back. I had meant to post this update prior to
leaving but didn't quite finish writing it in time.
I have carefully read the SVG specification with regards to units, coming
up with examples and a plan for implementation of real world units.
http://www.mpetroff.net/archives/2013/08/24/analysis-of-svg-units/
-Matthew
9 years, 9 months
[Recolor] Progress Report
by Arshdeep Singh
Hello all,
First of all apologies for being out of touch for so long. There was a
placement drive in my college (which took place in October every year but
was pre-poned to August this year) and hence I was busy studying. I resumed
work on the project from 17th August.
In a previous discussion with Ted and Krzysztof , it was concluded that
making an all-together separate ColorSelector class for RecolorWheel would
be better and much more convenient to code. I was busy doing that this
week. Now what remains is to hookup the signals for the recolor wheel. The
class nesting of Paint-Selector, GimpWheel etc has me caught a bit right
now. I'll figure those out soon.
Thanks.
--
Arshdeep Singh
Third Year, Computer Engineering
Delhi Technological University
Ph: +91-9654115614
https://sites.google.com/site/adsingh1729/home
9 years, 9 months
Image question
by mathog
On import of a 10 x 10 color 3 color bitmap from EMF (intrinsically
"sharp") it is converted to the following
SVG (sorry about the wrap):
<image
y="374.99722"
x="404.997"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAAUElEQVQYlW2OwQ3AMAgDrxJjwP6DAXO0j1QJQfiFMGfzvBBKKG7DIAGgjIrfni4SQPwsrHJLmy4ZZdVsyKulhm/utBT6ytHbzv74uhDvXJV9Tw0bLHsWOIMAAAAASUVORK5CYII="
height="14.999889"
width="14.999889"
transform="matrix(1,0,0,1,0,0)"
id="image4597" />
When viewed in Inkscape on either Linux or Windows there is what looks
like a compression artifact, 1 pixel wide, all the way
around the square. However, when viewed in Seamonkey, Firefox, or
Opera it is sharp, with the colors just as expected from
the original bitmap. (Opera is best for this, because it can zoom in
further than the other two browsers.)
What accounts for this? Is there some switch one can throw in Inkscape
to disable whatever it is doing (anti-aliasing, maybe?) to cause this
effect?
Thanks,
David Mathog
mathog@...1176...
Manager, Sequence Analysis Facility, Biology Division, Caltech
9 years, 9 months
Re: [Inkscape-devel] [CAD] Status
by Tavmjong Bah
Hi Sebastian,
On Sat, 2013-08-17 at 00:13 +0200, Sebastian Götte wrote:
> Hi,
> This week I mainly squashed some bugs. The current code [0] still requires -std=c++11 in the CXXFLAGS.
> Connector creation is working properly now, without stray points left over afterwards. Points can be selected in groups which can be transformed (scale, shear, rotate, translate etc.). Simple orthogonal routing and straight routing work. Libavoid routing works as far as there are no objects to be avoided (I did not yet test it with objects to be avoided). Multiple connectors can be connected to the same endpoint.
>
I tried the code but wasn't able to actually draw any connectors. Since
then I've upgraded to Fedora 19. Now I cannot compile
connector-context.cpp. (It compiled under Fedora 18 I think.) I get the
following error:
CXX connector-context.o
In file included from /usr/include/glibmm-2.4/glibmm.h:89:0,
from /usr/include/gdkmm-2.4/gdkmm/pixbuf.h:9,
from ./ui/tool/control-point.h:13,
from ./ui/tool/selectable-control-point.h:12,
from ui/tool/connector-point-control.h:12,
from connector-context.cpp:97:
/usr/include/glibmm-2.4/glibmm/threads.h:203:11: error: field ‘gobject_’
has incomplete type
GThread gobject_;
^
/usr/include/glibmm-2.4/glibmm/threads.h: In member function ‘GThread*
Glib::Threads::Thread::gobj()’:
/usr/include/glibmm-2.4/glibmm/threads.h:199:29: error: ‘gobject_’ was
not declared in this scope
GThread* gobj() { return &gobject_; }
^
/usr/include/glibmm-2.4/glibmm/threads.h: In member function ‘const
GThread* Glib::Threads::Thread::gobj() const’:
/usr/include/glibmm-2.4/glibmm/threads.h:200:41: error: ‘gobject_’ was
not declared in this scope
const GThread* gobj() const { return &gobject_; }
^
I've noticed that pixbuf.h is included in several other Inkcape source
files which do compile. I am not going to have time to investigate
further until I get back from vacation after next week.
Tav
9 years, 9 months
Solving bug #166371 - SAX parser
by Krzysztof Kosiński
Hello
After fixing the XXE vulnerability, Inkscape can no longer read SVGs
that use entities in URLs. Notable cases include SVGs saved from Adobe
Illustrator. There does not seem to be a way to replace these entities
without reintroducing the XXE vulnerability.
https://bugs.launchpad.net/inkscape/+bug/166371
I just wanted to point out that the best way to solve this would be to
use libxml2's SAX parser or the newer XmlTextReader parser to directly
construct the tree of Inkscape::XML::Node's, instead of postprocessing
the XML tree obtained from the DOM-like parser. With this approach, we
could intelligently substitute only string entities and ignore
entities that point to URLs or external files. An additional bonus
would be a reduction in memory use and load time, since the libxml2
DOM tree would not be created.
http://www.xmlsoft.org/xmlreader.html
Regards, Krzysztof
9 years, 9 months
Re: [Inkscape-devel] Inkscape Wiki Account
by Drini Cami
Hello, I would like an account on the Inkscape wiki. I’ve been learning how
to write extensions, and would like to expand the information available.
Right now, I’d like to add screenshots of the different types of INX
parameters.
Thank you,
Drini
9 years, 9 months
EMF import on Linux
by Krzysztof Kosiński
Hello
I know that there is working EMF import on Linux, and you can paste
things from e.g. ChemDraw. Is it possible to make this code also work
on Linux, using e.g. libemf, or would it require writing a completely
new input filter?
Regards, Krzysztof
9 years, 9 months