b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

bitblt_bitblt srccopy_bitblt 拉伸(2)

电脑杂谈  发布时间:2017-02-12 05:04:10  来源:网络整理

srcPic.Dispose()

srcMem.ReleaseHdc(HDC2)

srcMem.Dispose()

srcBmp.Dispose()

End Sub

Codigo a insertar (From, Control, class..)

-----------------------------------------------

Dest = Picturebox a recibir el dibujo.

Src = Picturbox con imagen.

Mask 0 Picturebox con imagen.

BitBlt2(dest, 0, 0, 47, 47, Src, 0, 0, SRCAND)

BitBlt2(dest, 0, 0, 47, 47, Mask, 0, 0, SRCINVERT)

Gracias a Matthew Hazlett.

hello,

bitblt srccopy_bitblt 拉伸_bitblt

I have a image in picturebox, and the other image in the background of the picturebox.

the background image is the same image which is in picturebox1.image but it is coloured with block of dark colors for each parts.

now if i click on the picture box , i have given the code to retrive the color (ARGB) of background image where i clicked and then i have to colour the foreground image with the selected color from palette ,

but its coloring the background itself

...

i am using this code...

for coloring

Private Sub DoFill(ByVal sender As Object, ByVal ea As EventArgs)

' translate point to client co-ordinates

Dim pt As Point = m_pb.PointToClient(Control.MousePosition)

Dim x As Integer = pt.X

Dim y As Integer = pt.Y

Dim hDC1, hDC, hBrush As IntPtr

Dim g As Graphics = m_pb.CreateGraphics()

' get color of pixel clicked on

Dim clr As Color = CType(m_pb.BackgroundImage, Bitmap).GetPixel(x, y)

Dim cl As Color = CType(m_pb.Image, Bitmap).GetPixel(x, y)

Dim gdi_clr As Color = Color.FromArgb(0, clr.B, clr.G, clr.R)

Dim gdi_cl As Color = Color.FromArgb(0, cl.B, cl.G, cl.R)

Try

' get our device context


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-31928-2.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 万俟绍之
      万俟绍之

      恭喜杨洋代言的爱奇艺和索尼都有获奖哦

    • 商山客死
      商山客死

      但对有损我国主权的行为

    热点图片
    拼命载入中...