Hello friends!
I need a little help, I have a color in decimal (for example 6736896). How to get tones above or below, what's the logic?
Thanks
How to get tones above or below, what's the logic?
Antonio Linares wrote:Christiano,
? hb_NumToHex( 6736896 ) => 0x66CC00 (hexadecimal)
? hb_NumToHex( hb_bitAnd( 6736896, 0xFF0000 ) / 0xFF00 )
? hb_NumToHex( hb_bitAnd( 6736896, 0x00FF00 ) / 0x00FF )
? hb_NumToHex( hb_bitAnd( 6736896, 0x0000FF ) )
// calculation vertical
// ------------------------
// imageheight = 300
// sliderheight = 330
// slidertop = imagetop - 15
// slidermarks = 11 = 10 spaces
// slider-pixelrowpos = slider rowpos * 10
// sliderpos on imageclick = imagepixelpos / 300
// imagepos on sliderclick = sliderpos * 30
// image-columnpos = imagewidth / 2 = 25
// calculation horizontal
// --------------------------
// imagewidth = 340
// sliderwidth = 370
// sliderleft = imagejeft - 15
// slidermarks = 11 = 10 spaces
// slider-pixel-colpos = slider colpos * 10
// sliderpos on imageclick = imagepixelpos / 340
// imagepos on sliderclick = sliderpos * 34
// image-rowpos = imageheight / 2 = 22
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 59 guests