POV-Ray : Newsgroups : povray.general : Pixel Perfection for Skinning a Webinterface needed! Server Time
3 Aug 2024 16:22:57 EDT (-0400)
  Pixel Perfection for Skinning a Webinterface needed! (Message 1 to 5 of 5)  
From: Tim Nikias v2 0
Subject: Pixel Perfection for Skinning a Webinterface needed!
Date: 21 Jan 2004 15:14:23
Message: <400edd9f$1@news.povray.org>
Hi all!

Still entwined making a HTML interface for our library-programm, I've gone
through the adventure (to do something different than working on the same
Java-Files like in the former phase) and have researched quiet a bit on Html
(using selfhtml) and built our Java-Programm to truly create a dynamic
web-presentation of the library-programm. It supports a limited style of
skins (woohoo! :-), e.g. using either text or images as links, and then,
images may be added with a mouseover effect. To make that one running
properly, there's part of the Skin which tells the programm which images to
preload etc etc. All in all, pretty neat, IMHO.
To make things easy for skinning, the different sections are of specified
length. The menu spans a total of 700 pixels in width (to accomodate for
different viewing resolutions), 10 pixel on each side for borders, and then
136p per Menu button, of which there are five.
Underneath the "menu bar" is another bar which may be filled with another
10p bordered 680p image, chosen by the active menu.

Anyways, you're noticing that the sizes are hard-coded. Now to the skinning
part: I'd love to make one or two skins for the interface using POV-Ray.
Now, I need pixel perfection in order to assure that I've got the 10 pixel
border, 136 pixel per Menu button, etc. Does anyone have macros or ideas on
how to calculate pixel-perfect regions so that I know where to place
different objects etc and not pass the limits?

Of course, there's always trial and error, but that's not very efficient in
order to create several skins...

Any ideas?

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

From: ABX
Subject: Re: Pixel Perfection for Skinning a Webinterface needed!
Date: 21 Jan 2004 15:26:45
Message: <osnt00damnfc7ek3cgk507freumg0jq4vr@4ax.com>
On Wed, 21 Jan 2004 21:08:19 +0100, "Tim Nikias v2.0" <tim.nikias (@)
nolights.de> wrote:
> Does anyone have macros or ideas on
> how to calculate pixel-perfect regions so that I know where to place
> different objects etc and not pass the limits?

Use orthographic camera with right and up adjusted to dimensions of window
where skin is targeted. No need for macros then. POV Units are pixels (or
rather grid between them). Think mathematically ;-)

ABX


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Pixel Perfection for Skinning a Webinterface needed!
Date: 21 Jan 2004 16:12:45
Message: <400eeb4d$1@news.povray.org>
> Use orthographic camera with right and up adjusted to dimensions of window
> where skin is targeted. No need for macros then. POV Units are pixels (or
> rather grid between them). Think mathematically ;-)

Ah, that was exactly what I needed. I've noticed though that it isn't truly
pixel perfect. When I use up y*100 and right x*700 I'd expect x*-350 to be
at the left edge and x*350 at the right. Still, x*-340 isn't at pixel 10
(counting from left).

But it's sufficient, thank you!

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

From: Hugo Asm
Subject: Re: Pixel Perfection for Skinning a Webinterface needed!
Date: 21 Jan 2004 17:46:24
Message: <400f0140$1@news.povray.org>
Maybe you can use this for something?


camera { orthographic right 1*x location -1*z look_at 0 angle 90 }

// The variable that can scale or move an object
// in steps of one pixel left / right / up / down

#declare Pixel = 2/<image_width,image_height,1>;
#declare My_Object = sphere { 0,10*Pixel }; // Radius = 10 pixels


Post a reply to this message

From: Rune
Subject: Re: Pixel Perfection for Skinning a Webinterface needed!
Date: 22 Jan 2004 10:30:27
Message: <400fec93@news.povray.org>
Tim Nikias v2.0 wrote:
> I've noticed though that it isn't truly pixel perfect.
> When I use up y*100 and right x*700 I'd expect x*-350 to
> be at the left edge and x*350 at the right. Still, x*-340
> isn't at pixel 10 (counting from left).

I've had the opposite experience. See this example scene:

// 100% pixel perfect without antialiasing
// +w160 +h120 -a

// 100% pixel perfect with antialiasing method 1
// +w160 +h120 +a0.1 +am1 +r6

// very small bleed with with antialiasing method 2
// +w160 +h120 +a0.1 +am2 +r6

#declare W = image_width;
#declare H = image_height;
camera {
   orthographic
   location -100*z
   right W*x
   up H*y
}
#default {finish {ambient 1 diffuse 0}}
plane {-z,0 pigment {checker rgb 0, rgb 1 scale 5}}
sphere {-30*x, 20 pigment {red 1}}
box {-20,20 translate 30*x pigment {blue 1}}


--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Dec 30**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.