Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


How to get those Angled BWLABELs??

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
bmestep



Joined: 12 Sep 2007
Posts: 3
Location: Memphis

PostPosted: Tue Sep 18, 2007 4:55 pm    Post subject: How to get those Angled BWLABELs?? Reply with quote

Maybe I've missed this somewhere in all the documentation and the configuration page of the manual...

How does one make the angled BW labels as depicted in this map? http://www.network-weathermap.com/node/78

I want to be cool like Howie too!!


Thanks,

Brian
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Tue Sep 18, 2007 5:01 pm    Post subject: Re: How to get those Angled BWLABELs?? Reply with quote

bmestep wrote:
Maybe I've missed this somewhere in all the documentation and the configuration page of the manual...

How does one make the angled BW labels as depicted in this map? http://www.network-weathermap.com/node/78

I want to be cool like Howie too!!


Thanks,

Brian


Two steps:
Code:

# define a truetype-based font (the 7 is the size)
FONTDEFINE 101 sometrutypefont.ttf 7

# set your default link (or specific ones) to use that font, and change the BWSTYLE
LINK DEFAULT
   BWSTYLE angled
   BWFONT 101


You must use a truetype font for this (and for link comments) because GD can't draw other fonts at any angle other than 0 and 90 degrees.

(sorry brian, I forgot to reply to your PM )
Back to top
bmestep



Joined: 12 Sep 2007
Posts: 3
Location: Memphis

PostPosted: Tue Sep 18, 2007 5:12 pm    Post subject: Reply with quote

Got it.
The angled text is just about the coolest thing...

When you angle the text how do you "modify" the LABEL so it blends into the link itself?

I've done the 'BWOUTLINECOLOR none' to remove the outline, but can't blend the background color on the label itself.

Thanks again!
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Tue Sep 18, 2007 5:21 pm    Post subject: Reply with quote

bmestep wrote:
Got it.
The angled text is just about the coolest thing...

When you angle the text how do you "modify" the LABEL so it blends into the link itself?

I've done the 'BWOUTLINECOLOR none' to remove the outline, but can't blend the background color on the label itself.

Thanks again!


Can't you do "BWBOXCOLOR none" too? Yes, I think you can...
Back to top
bmestep



Joined: 12 Sep 2007
Posts: 3
Location: Memphis

PostPosted: Tue Sep 18, 2007 5:35 pm    Post subject: Reply with quote

That's the trick, but now I've got a feature request!

Would be helpful to be able to rotate the text another 180degrees. I can make the text flip by changing the order of the nodes specified in the LINK section but that means that in & out have to flip too.

(hint hint) BWSTYLE classic, angled, angled180

I have a Logical map similar to the walkthrough map you have with the VLANs where I'm using this feature.

Minor point, great feature.

THANKS HOWIE!!!

------------------------------

sample for others:
FONTDEFINE 21 /usr/include/Fonts/arial.ttf 7

LINK DEFAULT
BWLABEL bits
BWFONT 21
WIDTH 6
BANDWIDTH 1000M
BWSTYLE angled
BWOUTLINECOLOR none
BWBOXCOLOR none

(I turn on the outline and box color for specific links and set BWSTYLE to classic)
Back to top
khooker



Joined: 22 Mar 2007
Posts: 8
Location: Paris

PostPosted: Tue Oct 23, 2007 5:46 pm    Post subject: Reply with quote

Hello Howie,
what is the font you are using in this example map:

http://www.network-weathermap.com/node/78

Thanks & Brgds,
Khooker
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Tue Oct 23, 2007 6:43 pm    Post subject: Reply with quote

khooker wrote:
Hello Howie,
what is the font you are using in this example map:

http://www.network-weathermap.com/node/78

Thanks & Brgds,
Khooker


Probably Vera. It's in the docs/examples folder of your weathermap installation.
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Wed Oct 24, 2007 12:26 pm    Post subject: Reply with quote

bmestep wrote:
That's the trick, but now I've got a feature request!

Would be helpful to be able to rotate the text another 180degrees. I can make the text flip by changing the order of the nodes specified in the LINK section but that means that in & out have to flip too.

(hint hint) BWSTYLE classic, angled, angled180

I have a Logical map similar to the walkthrough map you have with the VLANs where I'm using this feature.

Minor point, great feature.


I thought I'd added the same logic to angled labels as I did to link comments - they automatically flip over if they would be upside down otherwise. I will do that. So no need for angled180.
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Wed Oct 24, 2007 3:08 pm    Post subject: Reply with quote

Howie wrote:
bmestep wrote:
That's the trick, but now I've got a feature request!

Would be helpful to be able to rotate the text another 180degrees. I can make the text flip by changing the order of the nodes specified in the LINK section but that means that in & out have to flip too.

(hint hint) BWSTYLE classic, angled, angled180

I have a Logical map similar to the walkthrough map you have with the VLANs where I'm using this feature.

Minor point, great feature.


I thought I'd added the same logic to angled labels as I did to link comments - they automatically flip over if they would be upside down otherwise. I will do that. So no need for angled180.


Actually, I just tested it, and they are all the right way up, anyway...



angles.png
 Description:
Angled BWLABELs. None are upside-done.
 Filesize:  17.3 KB
 Viewed:  1152 Time(s)

angles.png


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group