Jump to content
Fivewin Brasil

Onde posso conseguir este programa ?


ZECA

Recommended Posts

Não lembro onde vi, mas existe um programa que vc passa o cursor em cima da cor e retorna o numero correspondente a

aquela cor.

Onde posso conseguir este programa e como ele chama ?

Sds

José Carlos - ZECA

fw23c-clipper52e-blinker 7.0 - six 3.02 - Windows XP

Link to comment
Share on other sites

Não lembro onde vi, mas existe um programa que vc passa o cursor em cima da cor e retorna o numero correspondente a

aquela cor.

Onde posso conseguir este programa e como ele chama ?

Sds

José Carlos - ZECA

fw23c-clipper52e-blinker 7.0 - six 3.02 - Windows XP

Link to comment
Share on other sites

Olá pessoal,

Eu peguei este exemplo em algum lugar e adaptei para as minhas necessidades aqui. Veja se server para vocês:


#include "fivewin.ch"

static oWnd

static nZoom := 2

static oColor

function main()

local oTimer

DEFINE WINDOW oWnd TITLE "Prueba de ventana" MENU mimenu()

DEFINE TIMER oTimer OF oWnd ;

INTERVAL 70 ACTION GetColor()

oTimer:Activate()

ACTIVATE WINDOW oWnd

oTimer:DeActivate()

return nil

function mimenu()

local oMenu

MENU oMenu

MENUITEM "Zoom"

MENU

MENUITEM "1" ACTION ( nZoom := 1 )

MENUITEM "2" ACTION ( nZoom := 2 )

MENUITEM "3" ACTION ( nZoom := 3 )

MENUITEM "4" ACTION ( nZoom := 4 )

MENUITEM "5" ACTION ( nZoom := 5 )

ENDMENU

ENDMENU

return oMenu

function GetColor()

local hDeskTop := GetDC(0)

local a := GetCursorPos()

local nColor := GetPixel( hDeskTop, a[2], a[1] )

local hDC := oWnd:GetDC()

local hPen := CreatePen( PS_SOLID,1,CLR_HRED )

local hOldPen

local nTop, nLeft

local nWidth, nHeight

nTop := 10

nLeft := 100

nWidth := 300

nHeight := 200

SetBkColor( hDC, nColor )

TextOut( hDC, 10, 10, " " )

TextOut( hDC, 25, 10, " " )

TextOut( hDC, 40, 10, " " )

TextOut( hDC, 60, 10, " " + corTOrgb( nColor ) + " " )

Moveto( hDC, nLeft-1, nTop-1)

Lineto( hDC, nLeft + nWidth+1, nTop-1 )

Lineto( hDC, nLeft + nWidth+1, nTop+nHeight+1 )

Lineto( hDC, nLeft -1, nTop+nHeight+1 )

Lineto( hDC, nLeft-1, nTop-1)

StretchBlt( hDC, nLeft, nTop, nWidth, nHeight, hDeskTop, a[2]-(nWidth/(nZoom*2)), a[1]-(nHeight/(2*nZoom)), nWidth/nZoom, nHeight/nZoom, 13369376 )

hOldPen := SelectObject( hDC, hPen )

Moveto( hDC, nLeft+nWidth/2+1, nTop-1 )

Lineto( hDC, nLeft+nWidth/2+1, nTop+nHeight+1 )

Moveto( hDC, nLeft+1, nTop+nHeight/2+1 )

Lineto( hDC, nLeft+nWidth+1, nTop+nHeight/2+1 )

SelectObject( hDC, hOldPen )

DeleteObject( hPen )

oWnd:ReleaseDC()

ReleaseDC( 0, hDeskTop )

return nil

*****************

function corTOrgb( Cor1 )

*****************

local Cor2, Cor3

Cor3 := int(Cor1 / 65536)

Cor2 := int( ( Cor1 - ( Cor3 * 65536 ) ) / 256 )

Cor1 := Cor1 - ( Cor3 * 65536 ) - ( Cor2 * 256 )

return strzero(Cor1,3) + "," + strzero(Cor2,3) + "," + strzero(Cor3,3)

#pragma BEGINDUMP

#include "windows.h"

#include "hbapi.h"

HB_FUNC( STRETCHBLT )

{

hb_retl( StretchBlt( (HDC) hb_parnl( 1 ) ,

hb_parni( 2 ) ,

hb_parni( 3 ) ,

hb_parni( 4 ) ,

hb_parni( 5 ) ,

(HDC) hb_parnl( 6 ) ,

hb_parni( 7 ) ,

hb_parni( 8 ) ,

hb_parni( 9 ) ,

hb_parni( 10 ) ,

(DWORD) hb_parnl( 11 )

) ) ;

}

#pragma ENDDUMP

id=code>id=code>

Rossine

FW 2.2c + @say + Clipper 5.2e + libs 5.3b / FWH 8.09 + @say + xHarbour Divinópolis/ MG

Link to comment
Share on other sites

citação:

Não lembro onde vi, mas existe um programa que vc passa o cursor em cima da cor e retorna o numero correspondente a

aquela cor.

Onde posso conseguir este programa e como ele chama ?

Sds

José Carlos - ZECA

fw23c-clipper52e-blinker 7.0 - six 3.02 - Windows XP


id=quote>id=quote>

Ate o Panit lhe da isso

Marcelo Michels

Msn/E-mail:marcelo@infototal.com.br

Msn/E-mail:celo.michels@hotmail.com

xHarbour 1.1 + Fwh 8.01 + WorkShop + Bcc 5.82 + WvwTools + SQLRDD + xMate.

Link to comment
Share on other sites

Desculpe te acordar a esta horaicon_smile_big.gif

Se vc. usa o firefox intale o pluguim colorzila e pronto..

´rocurei e não encontrei, no forum internacional tem um programa que faz isso, procure lá por gradient, Bartools ou por gradient-painter

Abraços..

Luiz Arruda - Corumba(MS)

FiveWin 9.04

[x]Harbour

xDev

WS

--

Não existe nada de completamente errado no mundo mesmo um relógio parado consegue estar certo duas vezes por dia.

-

Não Abandone Seu Tópicoid=red>

Link to comment
Share on other sites

citação:

Olá pessoal,

Eu peguei este exemplo em algum lugar e adaptei para as minhas necessidades aqui. Veja se server para vocês:


#include "fivewin.ch"

static oWnd

static nZoom := 2

static oColor

function main()

local oTimer

DEFINE WINDOW oWnd TITLE "Prueba de ventana" MENU mimenu()

DEFINE TIMER oTimer OF oWnd ;

INTERVAL 70 ACTION GetColor()

oTimer:Activate()

ACTIVATE WINDOW oWnd

oTimer:DeActivate()

return nil

function mimenu()

local oMenu

MENU oMenu

MENUITEM "Zoom"

MENU

MENUITEM "1" ACTION ( nZoom := 1 )

MENUITEM "2" ACTION ( nZoom := 2 )

MENUITEM "3" ACTION ( nZoom := 3 )

MENUITEM "4" ACTION ( nZoom := 4 )

MENUITEM "5" ACTION ( nZoom := 5 )

ENDMENU

ENDMENU

return oMenu

function GetColor()

local hDeskTop := GetDC(0)

local a := GetCursorPos()

local nColor := GetPixel( hDeskTop, a[2], a[1] )

local hDC := oWnd:GetDC()

local hPen := CreatePen( PS_SOLID,1,CLR_HRED )

local hOldPen

local nTop, nLeft

local nWidth, nHeight

nTop := 10

nLeft := 100

nWidth := 300

nHeight := 200

SetBkColor( hDC, nColor )

TextOut( hDC, 10, 10, " " )

TextOut( hDC, 25, 10, " " )

TextOut( hDC, 40, 10, " " )

TextOut( hDC, 60, 10, " " + corTOrgb( nColor ) + " " )

Moveto( hDC, nLeft-1, nTop-1)

Lineto( hDC, nLeft + nWidth+1, nTop-1 )

Lineto( hDC, nLeft + nWidth+1, nTop+nHeight+1 )

Lineto( hDC, nLeft -1, nTop+nHeight+1 )

Lineto( hDC, nLeft-1, nTop-1)

StretchBlt( hDC, nLeft, nTop, nWidth, nHeight, hDeskTop, a[2]-(nWidth/(nZoom*2)), a[1]-(nHeight/(2*nZoom)), nWidth/nZoom, nHeight/nZoom, 13369376 )

hOldPen := SelectObject( hDC, hPen )

Moveto( hDC, nLeft+nWidth/2+1, nTop-1 )

Lineto( hDC, nLeft+nWidth/2+1, nTop+nHeight+1 )

Moveto( hDC, nLeft+1, nTop+nHeight/2+1 )

Lineto( hDC, nLeft+nWidth+1, nTop+nHeight/2+1 )

SelectObject( hDC, hOldPen )

DeleteObject( hPen )

oWnd:ReleaseDC()

ReleaseDC( 0, hDeskTop )

return nil

*****************

function corTOrgb( Cor1 )

*****************

local Cor2, Cor3

Cor3 := int(Cor1 / 65536)

Cor2 := int( ( Cor1 - ( Cor3 * 65536 ) ) / 256 )

Cor1 := Cor1 - ( Cor3 * 65536 ) - ( Cor2 * 256 )

return strzero(Cor1,3) + "," + strzero(Cor2,3) + "," + strzero(Cor3,3)

#pragma BEGINDUMP

#include "windows.h"

#include "hbapi.h"

HB_FUNC( STRETCHBLT )

{

hb_retl( StretchBlt( (HDC) hb_parnl( 1 ) ,

hb_parni( 2 ) ,

hb_parni( 3 ) ,

hb_parni( 4 ) ,

hb_parni( 5 ) ,

(HDC) hb_parnl( 6 ) ,

hb_parni( 7 ) ,

hb_parni( 8 ) ,

hb_parni( 9 ) ,

hb_parni( 10 ) ,

(DWORD) hb_parnl( 11 )

) ) ;

}

#pragma ENDDUMP

id=code>id=code>

Rossine

FW 2.2c + @say + Clipper 5.2e + libs 5.3b / FWH 8.09 + @say + xHarbour Divinópolis/ MG


id=quote>id=quote>

Bom dia Rossine !!!

Achei muito legal esta rotina e coloquei no meu arquivo para uso futuro mas o que estou querendo é semelhante a este programa porém que retorne a cor não em RGB(XXX,XXX,XXX) mas sim em numero inteiro como por exemplo:

8388608 (acho que este numero corresponde a uma variação do azul, por exemplo)

16733011

tem como fazer isto.

Sds

José Carlos - ZECA

fw23c-clipper52e-blinker 7.0 - six 3.02 - Windows XP

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...