Stroke width

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Stroke width

Parthasarathy R.

Hi,

 

I am unable to get the stroke width for the path item in “mm”,

 

Inkscape::Util::Unit const *const unit = unitSelector->getUnit();

for (std::vector<SPItem*>::const_iterator i = items.begin(); i != items.end(); ++i) {

                    

double sw = (*i)->style->stroke_width.computed;

double ei = Inkscape::Util::Quantity::convert(sw, unit, "mm");

 

Please suggest proper way to get.

 

Regards,

Sarathy


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Stroke width

Jabier Arraiza

Hi Sarathy.

Could you try with unit->abbr?
Also Inkscape::Util::Unit const *const unit become
into:Inkscape::Util::Unit const * unit

Cheers, Jabier.



On Wed, 2017-11-15 at 13:30 +0000, Parthasarathy R. wrote:

> Hi,
>  
> I am unable to get the stroke width for the path item in “mm”,
>  
> Inkscape::Util::Unit const *const unit = unitSelector->getUnit();
> for (std::vector<SPItem*>::const_iterator i = items.begin(); i !=
> items.end(); ++i) {
>                     
> double sw = (*i)->style->stroke_width.computed;
> double ei = Inkscape::Util::Quantity::convert(sw, unit, "mm");
>  
> Please suggest proper way to get.
>  
> Regards,
> Sarathy
> -------------------------------------------------------------------
> -----------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Stroke width

Parthasarathy R.

Thank you jabier.

Regards,
Sarathy
-----Original Message-----
From: Jabier Arraiza [mailto:[hidden email]]
Sent: 16 November 2017 AM 02:32
To: Parthasarathy R.; '[hidden email]'
Subject: Re: [Inkscape-devel] Stroke width


Hi Sarathy.

Could you try with unit->abbr?
Also Inkscape::Util::Unit const *const unit become into:Inkscape::Util::Unit const * unit

Cheers, Jabier.



On Wed, 2017-11-15 at 13:30 +0000, Parthasarathy R. wrote:

> Hi,
>  
> I am unable to get the stroke width for the path item in “mm”,
>  
> Inkscape::Util::Unit const *const unit = unitSelector->getUnit(); for
> (std::vector<SPItem*>::const_iterator i = items.begin(); i !=
> items.end(); ++i) {
>                     
> double sw = (*i)->style->stroke_width.computed;
> double ei = Inkscape::Util::Quantity::convert(sw, unit, "mm");
>  
> Please suggest proper way to get.
>  
> Regards,
> Sarathy
> -------------------------------------------------------------------
> -----------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot 
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel