-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 3 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 3 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
AIIAOffline
Location:
14 Post subject: non-rectangle + antialias + tranluency form?  PostPosted: 19/Aug/2006 08:31
onConfident


Joined: 02-Jul-2006
Posts: 17

Status: Offline
ada yang tau cara implementasi tutorial ini ?

{
Ever been unhappy with the way windows displays a definate edge on all its
components? Ever wanted your components to blend in with its surroundings?
Well, you can, and here is how :

Did you know that every time your component receives a WM_PAINT message, its
canvas property contains the image of the underlyning screen? By using this
image, it is quite easy to make your component's image interact with its
background rather than simply replacing it.

For example, if you wish to draw an image, you could quite easily draw a drop
shadow for your image like so
}

BitBlt(Canvas.Handle,0,0,Width,Height,bmpDropShadow.Canvas.Handle, 0,0,SrcAnd);
Canvas.Draw(0,0,bmpMyImage);

{
The first line will blend your drop shadow in to the surroundings, the second
will draw your image (obviously this should be transparent).
}

atau yang ini?

www.blichmann.de/downloads/translucency_tutorial.pdf

yang ini bagus, tapi ada yang tahu cara yang lebih simple? tanpa tambahan library misalnya.

terus kalau aku coba tambahin komponen lain, pada saat run tidak kelihatan? yang kelihatan cuman bitmap nya?! Solusi?

thanks
 
 View user's profile Send private message  
Reply with quote Back to top
kaka-delphi
Location: Taziex
Post subject:   PostPosted: 19/Aug/2006 12:07
onElite


Joined: 12-Oct-2005
Posts: 1050
Location: Taziex
      Quote:
atau yang ini?

www.blichmann.de/downloads/translucency_tutorial.pdf

yang ini bagus, tapi ada yang tahu cara yang lebih simple? tanpa tambahan library misalnya.

terus kalau aku coba tambahin komponen lain, pada saat run tidak kelihatan? yang kelihatan cuman bitmap nya?! Solusi?

thanks


Disana kan udah ada contohnya ...
http://www.blichmann.de/downloads/translucency_source_d5.zip

Tambahan librarynya (Graphics32)... cenderung ke pengolahan bitmap dengan format pixel 32-bit, untuk mensupport antialiasing, alphablending yang dibutuhkan.
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
AIIAOffline
Location:
Post subject:   PostPosted: 19/Aug/2006 14:09
onConfident


Joined: 02-Jul-2006
Posts: 17

Status: Offline
      kaka-delphi wrote:


aku udah coba, tapi kok kalo di tambah komponen lain pada form (button misalnya) gak kelihatan waktu running. Sad
 
 View user's profile Send private message  
Reply with quote Back to top
_lmzOffline
Location: Surabaya
Post subject: Contoh tanpa Graphics32  PostPosted: 19/Aug/2006 14:44
onUber-Skilled


Joined: 14-Jul-2006
Posts: 423
Location: Surabaya
Status: Offline
Ini ada contohnya yang saya adaptasi tanpa Graphics32. Ada 2 button. Yang pertama untuk test gambar alpha-gradient ke image, yang kedua untuk test form transparan.

Linknya di:
http://rapidshare.de/files/29950026/testbmp.7z.html

Untuk buka, pake 7zip ya... Smile

Kalau yang tentang mau tampilan form + komponen tampak, bukankah di gambarnya skin Winamp itu malah tidak ada komponen standarnya. Siapa tahu dia cuma pake event MouseDown dkk untuk menentukan "button" mana yang diklik. Kalau mau tampil ya cari dulu caranya memasukkan gambar form ke dalam bitmap lalu yang ditampilkan gambar bitmap form itu tapi sesudah dicampur alpha.
 
 View user's profile Send private message  
Reply with quote Back to top
_lmzOffline
Location: Surabaya
Post subject: Gambar form ke bitmap  PostPosted: 19/Aug/2006 14:56
onUber-Skilled


Joined: 14-Jul-2006
Posts: 423
Location: Surabaya
Status: Offline
Tambahan...

Untuk menggambar ke bitmap bisa dengan method TWinControl.PaintTo() seperti ini:

code : pascal
  1. procedure TForm1.Button3Click(Sender: TObject);
  2. var bmp : TBitmap;
  3. begin
  4. bmp := TBitmap.Create;
  5. bmp.Width := ClientWidth;
  6. bmp.Height := ClientHeight;
  7. bmp.PixelFormat := pf32bit;
  8. PaintTo(bmp.Canvas, 0, 0);
  9. Image1.Picture.Bitmap.Assign(bmp);
  10. Image1.Repaint;
  11. bmp.Free;
  12. end;
Parsed in 0.002 seconds, using GeSHi


Nah, nanti kalau sudah sukses jangan lupa contoh form dengan bayangannya taruh sini ya Smile
 
 View user's profile Send private message  
Reply with quote Back to top
kaka-delphi
Location: Taziex
Post subject:   PostPosted: 20/Aug/2006 01:07
onElite


Joined: 12-Oct-2005
Posts: 1050
Location: Taziex
Sukses nich ... Very Happy

_lmz punya :



gw punya :



Hebat .... Kreenzzzz ..... Laughing
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
ImortalPersonOffline
Location:
Post subject:   PostPosted: 20/Aug/2006 05:02
onNovice


Joined: 20-Aug-2006
Posts: 9

Status: Offline
Akhirnya... Ada juga yang ngangkat thread ini. Udah gw cobain dari dulu.... Dan juga udah gw coba email ke authornya... tapi kagak ditanggepin... Emang susah kalo kita mo naruh visual component diatasnya. Gw masih nyubi. Bagi para master disini.. mohon pencerahannya. Apalah artinya bila kita tidak bisa meletakkan sebuah tombol diatasnya....
 
 View user's profile Send private message  
Reply with quote Back to top
ImortalPersonOffline
Location:
Post subject:   PostPosted: 20/Aug/2006 05:04
onNovice


Joined: 20-Aug-2006
Posts: 9

Status: Offline
Misalnya kita mo buat aplikasi database non rectangular form.... Khan repot tuh... Nah gimana biar dbgrid dan yang lainnya ikut keliatan...?
 
 View user's profile Send private message  
Reply with quote Back to top
ImortalPersonOffline
Location:
Post subject:   PostPosted: 20/Aug/2006 05:06
onNovice


Joined: 20-Aug-2006
Posts: 9

Status: Offline
Mohon bangettttt pencerahannya... Gw udah nyari solusinya kemana-mana tapi gak ketemu.... Mudah-mudahan para master Delphi Indonesia mampu memberikan solusinya.... Terima kasih
 
 View user's profile Send private message  
Reply with quote Back to top
_lmzOffline
Location: Surabaya
Post subject:   PostPosted: 20/Aug/2006 12:25
onUber-Skilled


Joined: 14-Jul-2006
Posts: 423
Location: Surabaya
Status: Offline
Terus terang saja dengan cara menggambar form ke bitmap lalu mengatur alpha channel dari bitmap maka sudah dapat dicapai efek "komponen visual tampak". Jadi kalau di situ yang dipakai untuk tampilan adalah skin, maka di sini yang dipakai untuk tampilan ("skin") adalah gambar form anda. Sudah saya coba sedikit dan tampaknya gambar button bisa diklik (tembus ke buttonnya)

Nah, akan tetapi untuk dapat mengambil gambar form lagi setiap tampilan form (mis. label) berubah saya tidak tau caranya.

Kalau yang dicari cuma efek "non-rectangular" tanpa per-pixel-alpha dan drop shadow yang... manis itu maka saya yakin Delphi 7 sudah bisa dengan membuat suatu warna ditransparankan dalam form. Jadi apabila background form anda itu image yang di tepi-tepinya ungu dan warna transparan diset ungu maka tepi-tepi image itu nanti akan hilang. Saya lupa property tepatnya tapi dulu pernah lihat . Smile Atau satu lagi cara yang agak lebih rumit adalah dengan menggunakan Region. Rasanya (?) kedua cara ini tidak dapat melakukan per-pixel-alpha.
 
 View user's profile Send private message  
Reply with quote Back to top
ImortalPersonOffline
Location:
Post subject:   PostPosted: 21/Aug/2006 02:49
onNovice


Joined: 20-Aug-2006
Posts: 9

Status: Offline
Ya... Saya sudah pernah mencoba semua cara-cara me-region-kan form pada Delphi. Sebenarnya masih ada cara untuk membuat form delphi tanpa menggunakan graphic32, non rectangular, dan mempunyai shadow... Namun, hasil yang didapat mengecewakan, karena bila Anda menggerakkan form Anda, maka akan terasa sangat lambat... Hal ini dikarenakan implementasi shadownya yang hanya bermodalkan layer.

Sedangkan kelebihan dari tutorialnya blichman ini, formnya sangat ringan dan mudah untuk digerakkan dan juga tidak memakan banyak memory... Satu hal lagi, kita tidak harus membuat image secara realtime... Dengan menggunakan Timage visual standarpun sudah bisa.

Nah, inilah yang menjadi kelemahan tutorial ini. Okelah kalau Anda cuma ingin membuat player standar atau apalah yang tidak memerlukan perubahan-perubahan visual di program Anda, tutorial ini sudah cukup buat Anda...

(bersambung...)
 
 View user's profile Send private message  
Reply with quote Back to top
ImortalPersonOffline
Location:
Post subject:   PostPosted: 21/Aug/2006 02:54
onNovice


Joined: 20-Aug-2006
Posts: 9

Status: Offline
Akan tetapi bila Anda ingin membuat program Anda tampil menarik dan attraktif... Anda masih harus mengembangkan lagi sourcenya.. Sad

Misalnya Anda meletakkan komponen DBGrid disana.... Bagaimana caranya...

Apakah masalahnya dikarenakan image layer yang terus menerus di update? Bila benar, bagaimana caranya untuk mengupdate komponen-komponen yang lain? Mohon tanggapannya...
 
 View user's profile Send private message  
Reply with quote Back to top
_lmzOffline
Location: Surabaya
Post subject:   PostPosted: 21/Aug/2006 15:34
onUber-Skilled


Joined: 14-Jul-2006
Posts: 423
Location: Surabaya
Status: Offline
Mungkin satu alternatif adalah dengan menggunakan colorkey/region untuk membentuk bagian window yang opaque/tidak tembus. Dengan ini maka control GUI jelas dapat terlihat dan terupdate secara normal.

Bagian kedua adalah membuat window kedua yang ditaruh di bawah window pertama. Window kedua ini hanya berisi gambar tepi window dan drop shadow dengan per-pixel-alpha. Posisi window kedua terus mengikuti posisi window pertama.

Ide ini datang dari http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=341766 , hasil search Google Smile

Kelemahannya adalah tidak bisa membuat control GUI yang terpotong oleh per-pixel alpha (DBGrid yang sisi kirinya opaque dan sisi kanannya full transparan, misalnya). Tapi mungkin ini bukan kendala bagi anda (?).

Kalau udah berhasil buatnya jangan lupa posting sourcenya di sini ya Smile Penasaran juga nih...
 
 View user's profile Send private message  
Reply with quote Back to top
AIIAOffline
Location:
14 Post subject:   PostPosted: 22/Aug/2006 21:21
onConfident


Joined: 02-Jul-2006
Posts: 17

Status: Offline
      Quote:

Really Great find Shocked Very Happy

thanks
 
 View user's profile Send private message  
Reply with quote Back to top
ImortalPersonOffline
Location:
Post subject:   PostPosted: 26/Aug/2006 03:17
onNovice


Joined: 20-Aug-2006
Posts: 9

Status: Offline
Aduhhh... Susah banget sih... masuknya...
Bro AIIA, bisa di kirimkan hasil jadi versi Delphinya yang bisa nampilkan control...
Disini aja imortalperson@yahoo.com atau post kesini ajah... Thanks... Penasaran...
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |