Position of title text in frame

Forum for english speaking users
Répondre
bertilh
Membre
Messages : 14
Inscription : jeu. janv. 08, 2009 11:17 pm

Position of title text in frame

Message par bertilh »

The variables position-x and position-y don´t change the position of the text in the frame. The angle can be changed and works fine but I don´t see any changes if the alignement is top, bottom, let or right.
Here is an example where the date and time is always in the middle.

<?xml version="1.0" encoding="iso-8859-1" ?>
<stylesheet>
<image width="115" height="245" />
<!-- ================= Outdoor Temperature ================= -->
<lineargauge width="100" height="225" shadow="0" orientation="1" position-x="10" position-y="10" margin-top="20" margin-right="9" margin-bottom="57" margin-left="11" >
<axis color="FF000000" min="-10" max="10" side="hcenter" titlemargin="15">
<labels labelinterval="1" side="left" hide="0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="1" />
</labels>
<ticks majorticks="5" minorticks="4" side="left" hidefirst="0" hidelast="0" hideminorticks="0" hide="0" minorticksize="5" majorticksize="9"/>
</axis>
<index>
<current_outdoor_temperature color1="FFFF0000" color2="FF00FF00" filled="1" side="left" thick="7" axisdelta="0"/>
</index>
<border cornerradius="0" color="FF000000" thick="0" />
<background color="ff0000ff" texture="img_modern_thermo1_130x300.png" stretch="1" />
<gaugebackground color="FF000000" texture="" />
</lineargauge>
<frame width="100" height="225" position-x="10" position-y="10">
<title text="$CurrentDate[%x %H:%M]" alignement="top|center" angle="0" position-x="100.0" position-y="100.0">
<font color="FF000000" facename="Arial" size="14" weight="400" italic="1" />
</title>
<background color="ff0000ff" texture="img_modern_thermo2_130x300.png" stretch="1" />
</frame>
</stylesheet>
Vous ne pouvez pas consulter les pièces jointes insérées à ce message.
Avatar de l’utilisateur
jturlier
Membre
Messages : 3149
Inscription : mar. août 22, 2006 8:38 am
Localisation : 34410 Sérignan - Languedoc
Contact :

Re: Position of title text in frame

Message par jturlier »

hello,
When position is specified in decimal, this is a percentage otherwise it's in pixels. Alignement should be 5 (top center are not correct values)
http://meteozoir.homeip.net/doc_objets_ ... position-x
Have a nice day
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"
bertilh
Membre
Messages : 14
Inscription : jeu. janv. 08, 2009 11:17 pm

Re: Position of title text in frame

Message par bertilh »

Hello,
Have not seen any case where position-x or position-y can move the text in a frame. I have tried with values 50 or 100 (pixels) and 0.1 or 0.5 which should be 10 % or 50 % of the frame.
alignment="top|hcenter" angle="0" puts the text at the top and
alignment="vcenter|hcenter" angle="0" puts the text in the middle and
alignment="bottom|hcenter" angle="0" puts the text at the bottom.
alignment="vcenter|left" angle="90" and alignment="vcenter|right" angle="90" both puts a vertical text in the middle.
Did found no way to put the text on the left or right side.
I also tried alignment="relative" which give the same result as alignment="bottom|hcenter" and position-x and position-y have no influence.

This can also be seen in the Stylesheets/gauges.xml that comes with GraphWeather. The title text "Rainfall" in the rain gauge is not possible to move with position-x or position-y. It can be moved down with "\n" in the beginning of the text string.
However the title text in "lineargauge" can be moved which is shown in the gauges for outdoor temperature and dew point.
Avatar de l’utilisateur
TiToine
Site Admin
Messages : 3356
Inscription : lun. mars 20, 2006 11:16 am
Localisation : Montréal
Contact :

Re: Position of title text in frame

Message par TiToine »

Maybe you should use a TextBox? More easy to move.
Répondre