transparent

ImageMagick - How do I flatten white levels to pure white?

倖福魔咒の 提交于 2020-01-13 02:53:10
问题 I have a png image with a white background which I'd like to turn transparent. This is fairly simple with this command: $ convert image.png -transparent white image-trans.png However, if the white background is not completely white (i.e, #FFFFFF , rgb(255,255,255) , etc), then this doesn't work well. Is there a way to set reduce everything below a certain threshold to complete white? Thanks. 回答1: The commandline option you are looking for is -white-threshold value{%} So a command of convert

How can i make a JPopupMenu transparent?

微笑、不失礼 提交于 2020-01-11 08:58:09
问题 I'd like to customize the look of JPopupMenu so i made a custom class extending the JPopupMenu class on i overrode the paintComponent method as i would do for any component i need to customize. public class CustomPopupMenu extends JPopupMenu { @Override public paintComponent(Graphics g) { //custom draw } } The only problem i have right know is that i'm not able to make the JPopupMenu transparent. I though setOpaque(false) would be enough, i was wrong. How can i make a JPopupMenu transparent?

make part of div border transparent html

断了今生、忘了曾经 提交于 2020-01-11 08:31:12
问题 Can I make part (from x1 to x2) of div border transparent? If not what approach can you advice? My idea [very bad] is to draw border in canvas element and place it (canvas body is trasparent) over div element. 回答1: Since DIVs have only 4 elements (top, bottom, left, right) you can't make part of a border transparent AFAIK. However, you could create elements that would overlay your div and use relative positioning to build a border to your taste. For example: <style> .multiborder{ border:1px

WPF 3D transparent textures - clipping?

社会主义新天地 提交于 2020-01-11 05:44:09
问题 http://www.youtube.com/watch?v=gZNdfVwkttM - you can see all of the problem described on this video if you can't see pictures. All of walls in all images below have a semitransparent PNG texture. Each square wall, floor and ceiling tile is a separate GeometryModel3D (I know that is no good for performance but...). The floor and the ceiling of the central cube have no any geometry and textures - so they have a color the same as Window.Background (black). But the effect considered appears in

How to create an irregular shaped imagebutton where transparent part of image is not clickable?

别来无恙 提交于 2020-01-11 05:31:06
问题 I have an irregular shaped PNG image for example a round image where the corners are transparent. How can I create an imagebutton of this image and not letting the corners being touchable? If possible I may want to create other irregular shaped imagebuttons. 回答1: Check out the second answer to this question, I believe it's exactly what you need. Later edit: Quick summary: Use a TouchListener instead of ClickListener Inside the listener, if the event is MotionEvent.ACTION_DOWN , get the touch

CSS Transparent Border Problem In Firefox 4?

南笙酒味 提交于 2020-01-10 09:53:07
问题 I'm trying to create a pure CSS triangle for a tooltip. All browsers looks fine except for the latest Firefox 4. Here's the code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Untitled Document</title> <style> .arrow { border:50px solid; border-color:#eee transparent transparent transparent; display:block; height:0; width:0; top:50%; right:50%; position:absolute; } </style> </head> <body> <div style="border:1px solid #000; height:400px; width:400px; margin:50px auto;

IE8: Div hover only works when background color is set, very strange, why?

安稳与你 提交于 2020-01-09 10:22:29
问题 Situation: Got a div with buttons images. Div needs to fadeIn on hover. Works in all browsers, except Internet Explorer. When I give the div a background color it suddenly works. Check: http://ListAndPlay.com , top left are the controls. The hover won't work in IE, try to add a background color to #buttons and it suddenly works. Question: What is the reason for this? How to fix this properly? 回答1: I recently ran in to this problem also. I also solved it by adding a 1 by 1 px transparent

Android WebView style background-color:transparent ignored on android 2.2

冷暖自知 提交于 2020-01-08 12:00:12
问题 I'm struggling to create a WebView with transparent background. webView.setBackgroundColor(0x00FFFFFF); webView.setBackgroundDrawable(myDrawable); Then I load a html page with <body style="background-color:transparent;" ... The background color of the WebView is transparent but as soon as the page is loaded, it's overwritten by a black background from the html page. This only happens on android 2.2, it works on android 2.1. So is there something to add in the html page code to make it really

JToolbar background and drag problems

落爺英雄遲暮 提交于 2020-01-06 14:12:18
问题 I'm new to Swing and I currently work on some sort of graphic editor. First I started implementing the toolbar (class OptionsBar) as an extended JPanel. Everything looked fine(image below), but it didn't work as a toolbar (it wasn't always focused). Then I found out that there actually exists a JToolBar element, so I replaced "extends JPanel" with "extends JToolBar". I look thorugh toolbar specifications. It seemed like I should change anything. The problem is that the toolbar is transparent

Android OptionsMenu issue, background is always transparent

大兔子大兔子 提交于 2020-01-04 05:15:18
问题 My options menu always shows no background (background is transparent). Does anyone know how to ged rid of this? My activity where the fail is originated, extends from another custom activity. I had this project on eclipse and the optionsmenu worked normally, but since I migrated to AndroidStudio, the options menu is always transparent. I've tried to change the menu's xml, and create the menu programatically, but the background still transparent. 回答1: Probably too late, but in case people