Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7820
| From | "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: alphablend in fixedtext |
| Date | 2015-03-03 10:29 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <md3us0$djo$1@dont-email.me> (permalink) |
| References | <88ab84c7-96e3-4187-b7da-2eb495a5dda7@googlegroups.com> |
Hi Paulo,
I do not know if it works.
But alphablending of two RGB background colors can done also by yourself.
The functions for calculating the resulting RGB can be found in Internet.
Using the Windows alphablending is interesting only if the foreground is
alpha blended, that means semi transparent and not opaque as usually.
Arne
"Paulo Oliveira" <paulo@clipinfor.com> schrieb im Newsbeitrag
news:88ab84c7-96e3-4187-b7da-2eb495a5dda7@googlegroups.com...
> Hi All,
>
> It is possible apply AlphaBend() function to FixedText control?
>
> I have AlphaBendRatio in the selector of bBrowser, and i have a control to
> display the legend of colors.
> My problem is the control don't have AlphaBendRatio and the colors don't
> match with the bBrowser Selector, my control is:
>
> CLASS PoFixedTextLegenda INHERIT FixedText
> PROTECT oFT AS FixedText
> PROTECT nOwneralignment AS LONG
> METHOD ColocaQuadro() AS VOID PASCAL CLASS PoFixedTextLegenda
> LOCAL oPoint AS Point
> LOCAL oPoint2 AS Point
> LOCAL oDim AS Dimension
>
> oPoint := PClone(SELF:origin)
> oDim := PClone(SELF:size)
> oDim:width := oDim:height
> SELF:OFT := FixedText{SELF:Owner,-1,oPoint,oDim,""}
> //SELF:oFT:SetExStyle( WS_EX_DLGMODALFRAME, TRUE )
> SELF:oFT:SetExStyle( WS_EX_STATICEDGE, TRUE )
>
>
>
> //Now it's Work
> SetWindowPos(SELF:oFT:Handle(), NULL_PTR, 0, 0, 0, 0, ;
> _OR(SWP_FRAMECHANGED + SWP_NOMOVE + ;
> SWP_NOOWNERZORDER + SWP_NOSIZE ))
>
> SELF:oFT:Background:=Brush{color{COLORRED}} //Default
> //Adjust the placement of the Legenda (oFT)
> //oPoint:x := oPoint:x - oDim:width
> SELF:OFT:Origin := oPoint
> oPoint2:=PClone(SELF:Origin)
> oPoint2:x+=17
> SELF:Origin:=oPoint2
> //Resize the parent FixedText
>
> SetWindowPos(SELF:handle(),0L,oPoint:x,0,SELF:size:width-oDim:Width,SELF:size:height,SWP_NOMOVE+0x14)
> SELF:ShowControl()
> RETURN
> METHOD Hide() CLASS PoFixedTextLegenda
> SUPER:Hide()
> SELF:oFt:Hide()
>
> METHOD Init(oOwner, nId, oPoint, oDim, lDataAware ) CLASS
> PoFixedTextLegenda
> SUPER:Init(oOwner, nId, oPoint, oDim, lDataAware )
> SELF:SetStyle(SS_CENTERIMAGE,TRUE)
> SetWindowPos(SELF:Handle(), NULL_PTR, 0, 0, 0, 0, ;
> _OR(SWP_FRAMECHANGED + SWP_NOMOVE + ;
> SWP_NOOWNERZORDER + SWP_NOSIZE ))
>
> IF SELF:nOwneralignment <> OA_NO
> SELF:Owneralignment := SELF:nOwneralignment
> ENDIF
>
> SELF:ColocaQuadro()
>
> ASSIGN LegendaBKGround(uBrush) AS PASCAL CLASS PoFixedTextLegenda
> Default(@uBrush,Brush{Color{COLORRED}})
> RETURN SELF:oFT:Background:=uBrush
>
> ASSIGN OwnerAlignment(iNewVal) CLASS PoFixedTextLegenda
> IF !IsInstanceOf(oFormSurface, #Window) .or. !IsInstanceOf(oParent,
> #Window)
> SELF:nOwneralignment := OA_NO
> RETURN OA_NO
> ELSEIF IsInstanceOf(oFormSurface, #Window)
> oFormSurface:__AddAlign(SELF, iNewVal)
> IF SELF:OFT <> NULL_OBJECT
> oFormSurface:__AddAlign(SELF:OFT,iNewVal)
> ENDIF
> ELSE
> oParent:__AddAlign(SELF, iNewVal)
> IF SELF:OFT <> NULL_OBJECT
> oParent:__AddAlign(SELF:OFT,iNewVal)
> ENDIF
> ENDIF
>
> SELF:nOwneralignment := iNewVal
>
> RETURN NIL
> METHOD Show() CLASS PoFixedTextLegenda
> SUPER:Show()
>
> SELF:oFt:Show()
> METHOD ShowControl() CLASS PoFixedTextLegenda
> IF SELF:OFT <> NULL_OBJECT
> IF SELF:IsVisible()
> SELF:OFT:show()
> ELSE
> SELF:OFT:Hide()
> ENDIF
> IF !IsWindowEnabled(SELF:handle())
> SELF:OFT:disable()
> ENDIF
> ENDIF
>
> Some Help?
>
> Paulo
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread
alphablend in fixedtext Paulo Oliveira <paulo@clipinfor.com> - 2015-02-24 07:17 -0800 Re: alphablend in fixedtext "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2015-03-03 10:29 +0100
csiph-web