Search Results

Search found 593 results on 24 pages for 'transparency'.

Page 3/24 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Panel Background color, Transparency and background image don't work with Ambiance theme

    - by Ash G
    As the title suggests. Selecting a background image, color or using the transparency sitting doesn't work with the Ambiance theme. Sections of the panel will take the new settings, but many of the applets including the clock, Indicator Applet Session, Indicator Applet, Rhythmbox icon, Tomboy Icon, Separators and various others retain the Ambiance theme background. This carries over through restart. Also you cannot resize the panel in Ambiance above 24 pixels as the background image doesn't scale. Am I doing something wrong, is it a bug or is it meant to be like that? I really like Ambiance, but am having a hard time using it because of these issues Edit: It seems these issues carry over to Radiance and New Wave as well

    Read the article

  • Java Community Process Transparency

    - by Tori Wieldt
    As part of the openness and transparency rules the London Java Community (LJC) and SouJava worked for under JSR-348, the JCP Executive Committee now has a public discussion list where anyone in the community can voice their questions, comments and concerns!Go to http://java.net/projects/jcp-ec/lists to subscribe. Please note that you need to have a java.net account before you can subscribe to the mailing list. "Joining" the project won't get you subscribed to the list.   Cracks in the Ivory Tower - Courtesy Devoxx 2011

    Read the article

  • How To Change Window Transparency in Windows 7 with a Hotkey

    - by YatriTrivedi
    Linux has a lot of eye-candy because of Compiz, my favorite of which is the window opacity plugin. Using a short AutoHotKey script, you can add that same functionality to Windows 7. I used this AHK script as a basis for changing opacity. It uses a single hotkey to change the active window’s transparency by 25% each time until it resets to 0. I wanted functionality similar to Compiz, so I modified the script to use the mouse wheel and shortened the increments to get more variety. Just hold down the Windows key and scroll down to see through the window. This decreases opacity and makes windows more transparent. Latest Features How-To Geek ETC Learn To Adjust Contrast Like a Pro in Photoshop, GIMP, and Paint.NET Have You Ever Wondered How Your Operating System Got Its Name? Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions Hack Apart a Highlighter to Create UV-Reactive Flowers [Science] Add a “Textmate Style” Lightweight Text Editor with Dropbox Syncing to Chrome and Iron Is the Forcefield Really On or Not? [Star Wars Parody Video] Google Updates Picasa Web Albums; Emphasis on Sharing and Showcasing Uwall.tv Turns YouTube into a Video Jukebox Early Morning Sunrise at the Beach Wallpaper

    Read the article

  • How to draw semi-transparent text on a graphics object?

    - by awe
    I want to draw a text with 32 bit transparency on a graphics object. When I try, I only get black color in the result. If I try to draw a line with the same semitransparent color, it works perfectly. I have this code: lBitmap As New Bitmap(32, 32, PixelFormat.Format32bppArgb) lGraphic As Graphics = Graphics.FromImage(lBitmap) lGraphic.SmoothingMode = SmoothingMode.HighQuality lGraphic.InterpolationMode = InterpolationMode.HighQualityBicubic lGraphic.Clear(Color.Transparent) Dim lTestTransparencyColor As Color = Color.FromArgb(100, 140, 0, 230) lGraphic.DrawLine(New Pen(lTestTransparencyColor), 0, 0, 32, 32) lBrush As New SolidBrush(lTestTransparencyColor) lGraphic.DrawString("A", New Font("Arial", 12), lBrush, 0, 0) Dim lImage As Image = lBitmap lImage.Save("D:\Test.png", Imaging.ImageFormat.Png) The line is drawn with the transparency applied correctly, but the text is black with no transparency. I was thinking it may be that SolidBrush does not support transparency, but I found a predefined brush named Transparent (Brushes.Transparent) that was a SolidBrush when I looked at it in debug. I tried to use Brushes.Transparent as the brush when drawing the text, and it was successfully not showing at all. That means I get full transparency to work, but not partial transparency.

    Read the article

  • Multi-monitor aterm transparency

    - by Bryan Ward
    I have 3 monitors which I set the background with using xpmroot my-5760x1200bg.png I then setup aterm to use transparency by adding the following to my ~/.Xdefaults file. aterm*transparent:true aterm*shading:60 aterm*background:Black aterm*foreground:White aterm*scrollBar:true aterm*scrollBar_right:true aterm*transpscrollbar:true aterm*saveLines:32767 aterm*font:*-*-fixed-medium-r-normal--*-140-*-*-*-*-iso8859-1 aterm*boldFont:*-*-fixed-bold-r-normal--*-*-140-*-*-*-*-iso8859-1 I am getting transparency on my aterm windows, but the image that is coming through with the transparency isn't correct. On the left monitor things are fine, but the middle and right monitors both seem to use the leftmost 1920x1200 of the background image as what is behind the terminal window. It would be as if every screen had the same background as the monitor on the left. Is this something that can be configured to be correct, or is this a bug? I'm running Gentoo Linux with Xmonad.

    Read the article

  • How can I set a Java applet transparency to show contents behind it?

    - by yuri
    I've got a web page with an applet inside. This applet is a drop target on a drag and drop action from the OS, I simply take an image from a folder, drag it on the applet and something happens. I give this webpage to a graphic designer and he ask to if he can put an image behind the java applet so he can simulate to change the background using CSS (it is a skinned app and graphic design can change during execution). Practically i supposed to do: <div> <applet width="50" height="50" /> </div> with this CSS: div { width:50px; height:50px; background-image: url(image.jpg) center center no-repeat; } But it doesn't work (background is opaque). It is possible to set transparency to the applet without loosing drag and drop capabilities ? I'm searching something similar to flash wmode parameter. Better solutions implies only changes on the CSS/HTML without recompiling java class so the designing team can change the page structure without changing the Java.

    Read the article

  • Transparency in XNA-4 primitives

    - by Shashwat
    I'm using XNA 4 with Visual Studio 2010. I'm trying to create a simple 3D world with walls and doors in which the user to free to roam around. A wall is just a rectangle which is currently being rendered with four vertices using triangle strips. But to create a door, I'd have to split it into three rectangles as shown in the figure. Four quadrilaterals if I want to have the following door-style It will become more complex to have multiple doors on the same wall or if I have windows. Is there any shorter way to handle this? I am looking for something that will just make the wall transparent wherever I want. I found a solution but facing a problem here

    Read the article

  • How To Enable Aero Glass-Style Transparency in Windows 8

    - by Chris Hoffman
    Aero Glass is gone in Windows 8. If you really miss Aero Glass, there’s a trick you can use to re-enable the transparent window title bars and borders – although Microsoft doesn’t want us to. Microsoft has removed a lot of the code that makes Aero Glass, once an important Windows feature, possible. This trick doesn’t work perfectly – the blur effect has been removed by Microsoft and graphical corruption can occur in some situations. 6 Ways Windows 8 Is More Secure Than Windows 7 HTG Explains: Why It’s Good That Your Computer’s RAM Is Full 10 Awesome Improvements For Desktop Users in Windows 8

    Read the article

  • Performance issues with visibility detection and object transparency

    - by maul
    I'm working on a 3d game that has a view similar to classic isometric games (diablo, etc.). One of the things I'm trying to implement is the effect of turning walls transparent when the player walks behind them. By itself this is not a huge issue, but I'm having trouble determining which walls should be transparent exactly. I can't use a circle or square mask. There are a lot of cases where the wall piece at the same (relative) position has different visibility depending on the surrounding area. With the help of a friend I came up with this algorithm: Create a grid around the player that contains a lot of "visibility points" (my game is semi tile-based so I create one point for every tile on the grid) - the size of the square's side is close to the radius where I make objects transparent. I found 6x6 to be a good value, so that's 36 visibility points total. For every visibility point on the grid, check if that point is in the player's line of sight. For every visibility point that is in the LOS, cast a ray from the camera to that point and mark all objects the ray hits as transparent. This algorithm works - not perfectly, but only requires some tuning - however this is very slow. As you can see, it requries 36 ray casts minimum, but most of the time 60-70 depending on the position. That's simply too much for the CPU. Is there a better way to do this? I'm using Unity 3D but I'm not looking for an engine-specific solution.

    Read the article

  • Sprite transparency not effected libGDX

    - by Aon GoltzCrank
    I am making a game using libGDX and Tween Universal Engine. My problem is as follows: I have 2 screens so fars, a splash screen with the logo, and a second one which is the main menu. In the splash screen I use a SpriteBatch and a Sprite with the Texture of the image I want (which goes through some scaling.) Now I use the Tween engine, along with a created SpriteAccessor to control the alpha of the sprite. I fade the picture in, then fade it out, then change it to the next screen. In the next screen I have a single sprite, and a single, 3 slot, sprite array. In this screen I also use the tween engine, I fade the single sprite into the screen (it's the background image) then I try to, using the same method, (Tween.to) to change the alpah of the sprite array (each sprite by itself.), I first set it to 0 using Tween.set, then using the method I change it. This didn't work, after some tests I tried setting the alpha of a single sprite from the array to 0, and that didn't work. It's like the program is ignoring the alpha value, I even printed out the alpha value, it saying 0, but the sprite is visible. How can I fix this, or why might it be caused?

    Read the article

  • Financial Transparency is Good for Community

    - by ArnieRowland
    I was recently in a conversation with several people that had previously organized one or more community events. The topic evolved into a discussion of Sponsors, and eventually, fund raising. Being able to adequately raise the funds necessary is critical to producing a successful event. Many vendors will readily provide products for raffles and give-aways (SWAG), but the success of the event hangs on being able to raise cold, hard, cash. Venues and equipment have to be rented, refreshments and lunches...(read more)

    Read the article

  • Lack of Transparency in the Supply Chain Results in Inconsistent Reporting on Conflict Minerals

    - by Terri Hiskey
    May 31, 2014 was the official deadline for U.S.-listed companies to disclose use of conflict minerals to the SEC. Of the estimated 6,000 companies that were required to file audits of their tin, gold, tungsten or tantalum in their products, only 1,300 filed reports, and these results have revealed the ongoing challenges that many manufacturers are having complying with this legislation. An article authored by IDC analyst Heather Ashton,"Conflict Minerals Reporting Passes a Notable Milestone" notes that many leading companies such as Intel, Apple and HP filed their reports ahead of the deadline, but other companies are struggling with trying to trace their supply chain back to raw materials, especially as many non-U.S. based suppliers have no legal requirement to comply with the law since they are not U.S.-listed companies. This has resulted in widely varying levels of reporting from company to company. Check out the full article here. Are your customers experiencing the same pains?

    Read the article

  • Transparency call for Spec Leads and EC materials posted

    - by heathervc
    The materials and recording from the February 2012 call for JCP program Spec Leads is now available.  This call features Martijn Verburg, alternate EC representative for the London Java Community and includes information on the Adopt-a-JSR program.  The materials and audio recording of the  "Leveraging the Community" call can be found on the multimedia page of jcp.org .  The EC meeting summaries from February and March 2012 have also been posted.  Following the April 2012 EC Meeting this morning (minutes and materials will be posted soon), there are now four EC Members that have lost their voting privileges--AT&T, SK Telecom, Samsung and Twitter.  In order to regain their privileges, these EC Members must attend two EC meeting in a row, as detailed in the EC Standing Rules.

    Read the article

  • Adding Transparency/alpha to Embedded Font

    - by Shubhra Bhushan
    Hi guys, I have embedded a font type in my application. Its working fine inside a text area. Now i need to add 60% transparency to it. In fact I need multiple transparency levels. Like - 60 % transparency for TextARea 70% for WindowShade Header etc. How do I add alpha values to it?

    Read the article

  • debian (stable), google chrome, sencha and tranparency [closed]

    - by Kim Alders
    I am a bit unsure where to post this, but i guess it should be here, as it has to do with rendering in a browser. We have a sencha touch 1.1 application running in Google Chrome. On mij own computer (ubuntu) there are no problems. On the touch screen attached to a computer running debian-OS, transparency is shown as semi-transparent. It happens on sliders. Sliders have a button on them. This button is rendered bij sencha with CSS. It is NOT an image. Anyone has any idea how to get it 'nice' on debian too

    Read the article

  • Extracting the layer transparency into an editable layer mask in Photoshop

    - by last-child
    Is there any simple way to extract the "baked in" transparency in a layer and turn it into a layer mask in Photoshop? To take a simple example: Let's say that I paint a few strokes with a semi-transparent brush, or paste in a .png-file with an alpha channel. The rgb color values and the alpha value for each pixel are now all contained in the layer-image itself. I would like to be able to edit the alpha values as a layer mask, so that the layer image is solid and contains only the RGB values for each pixel. Is this possible, and in that case how? Thanks. EDIT: To clarify - I'm not really after the transparency values in themselves, but in the separation of rgb values and alpha values. That means that the layer must become a solid, opaque image with a mask.

    Read the article

  • CEN/CENELEC Lacks Perspective

    - by trond-arne.undheim
    Over the last few months, two of the European Standardization Organizations (ESOs), CEN and CENELEC have circulated an unfortunate position statement distorting the facts around fora and consortia. For the benefit of outsiders to this debate, let's just say that this debate regards whether and how the EU should recognize standards and specifications from certain fora and consortia based on a process evaluating the openness and transparency of such deliverables. The topic is complex, and somewhat confusing even to insiders, but nevertheless crucial to the European economy. As far as I can judge, their positions are not based on facts. This is unfortunate. For the benefit of clarity, here are some of the observations they make: a)"Most consortia are in essence driven by technology companies making hardware and software solutions, by definition very few of the largest ones are European-based". b) "Most consortia lack a European presence, relevant Committees, even those that are often cited as having stronger links with Europe, seem to lack an overall, inclusive set of participants". c) "Recognising specific consortia specifications will not resolve any concrete problems of interoperability for public authorities; interoperability depends on stringing together a range of specifications (from formal global bodies or consortia alike)". d) "Consortia already have the option to have their specifications adopted by the international formal standards bodies and many more exercise this than the two that seem to be campaigning for European recognition. Such specifications can then also be adopted as European standards." e) "Consortium specifications completely lack any process to take due and balanced account of requirements at national level - this is not important for technologies but can be a critical issue when discussing cross-border issues within the EU such as eGovernment, eHealth and so on". f) "The proposed recognition will not lead to standstill on national or European activities, nor to the adoption of the specifications as national standards in the CEN and CENELEC members (usually in their official national languages), nor to withdrawal of conflicting national standards. A big asset of the European standardization system is its coherence and lack of fragmentation." g) "We always miss concrete and specific examples of where consortia referencing are supposed to be helpful." First of all, note that ETSI, the third ESO, did not join the position. The reason is, of course, that ETSI beyond being an ESO, also has a global perspective and, moreover, does consider reality. Secondly, having produced arguments a) to g), CEN/CENELEC has the audacity to call a meeting on Friday 25 February entitled "ICT standardization - improving collaboration in Europe". This sounds very nice, but they have not set the stage for constructive debate. Rather, they demonstrate a striking lack of vision and lack of perspective. I will back this up by three facts, and leave it there. 1. Since the 1980s, global industry fora and consortia, such as IETF, W3C and OASIS have emerged as world-leading ICT standards development organizations with excellent procedures for openness and transparency in all phases of standards development, ex post and ex ante. - Practically no ICT system can be built without using fora and consortia standards (FCS). - Without using FCS, neither the Internet, upon which the EU economy depends, nor EU institutions would operate. - FCS are of high relevance for achieving and promoting interoperability and driving innovation. 2. FCS are complementary to the formally recognized standards organizations including the ESOs. - No work will be taken away from the ESOs should the EU recognize certain FCS. - Each FCS would be evaluated on its merit and on the openness of the process that produced it. ESOs would, with other stakeholders, have a say. - ESOs could potentially educate and assist European stakeholders to engage more actively and constructively with FCS. - ETSI, also an ESO, seems to clearly recognize these facts. 3. Europe and its Member States have a strong voice in several of the most relevant global industry fora and consortia. - W3C: W3C was founded in 1994 by an Englishman, Sir Tim Berners-Lee, in collaboration with CERN, the European research lab. In April 1995, INRIA (Institut National de Recherche en Informatique et Automatique) in France became the first European W3C host and in 2003, ERCIM (European Research Consortium in Informatics and Mathematics), also based in France, took over the role of European W3C host from INRIA. Today, W3C has 326 Members, 40% of which are European. Government participation is also strong, and it could be increased - a development that is very much desired by W3C. Current members of the W3C Advisory Board includes Ora Lassila (Nokia) and Charles McCathie Nevile (Opera). Nokia is Finnish company, Opera is a Norwegian company. SAP's Claus von Riegen is an alumni of the same Advisory Board. - OASIS: its membership - 30% of which is European - represents the marketplace, reflecting a balance of providers, user companies, government agencies, and non-profit organizations. In particular, about 15% of OASIS members are governments or universities. Frederick Hirsch from Nokia, Claus von Riegen from SAP AG and Charles-H. Schulz from Ars Aperta are on the Board of Directors. Nokia is a Finnish company, SAP is a German company and Ars Aperta is a French company. The Chairman of the Board is Peter Brown, who is an Independent Consultant, an Austrian citizen AND an official of the European Parliament currently on long-term leave. - IETF: The oversight of its activities is by the Internet Architecture Board (IAB), since 2007 chaired by Olaf Kolkman, a Dutch national who lives in Uithoorn, NL. Kolkman is director of NLnet Labs, a foundation chartered to develop open source software and open source standards for the Internet. Other IAB members include Marcelo Bagnulo whose affiliation is the University Carlos III of Madrid, Spain as well as Hannes Tschofenig from Nokia Siemens Networks. Nokia is a Finnish company. Siemens is a German company. Nokia Siemens is a European joint venture. - Member States: At least 17 European Member States have developed Interoperability Frameworks that include FCS, according to the EU-funded National Interoperability Framework Observatory (see list and NIFO web site on IDABC). This also means they actively procure solutions using FCS, reference FCS in their policies and even in laws. Member State reps are free to engage in FCS, and many do. It would be nice if the EU adjusted to this reality. - A huge number of European nationals work in the global IT industry, on European soil or elsewhere, whether in EU registered companies or not. CEN/CENELEC lacks perspective and has engaged in an effort to twist facts that is quite striking from a publicly funded organization. I wish them all possible success with Friday's meeting but I fear all of the most important stakeholders will not be at the table. Not because they do not wish to collaborate, but because they just have been insulted. If they do show up, it would be a gracious move, almost beyond comprehension. While I do not expect CEN/CENELEC to line up perfectly in favor of fora and consortia, I think it would be to their benefit to stick to more palatable observations. Actually, I would suggest an apology, straightening out the facts. This works among friends and it works in an organizational context. Then, we can all move on. Standardization is important. Too important to ignore. Too important to distort. The European economy depends on it. We need CEN/CENELEC. It is an important organization. But CEN/CENELEC needs fora and consortia, too.

    Read the article

  • (HTML) PNG on top of another PNG - possible to eliminate full transparency?

    - by MHTri
    I'd like to put a logo png onto of another coloured png. They both have transparent backgrounds. When I try this the images blend together. Curiously, in Photoshop the logo retains its opaque-ness - I put colours on the layers underneath it, another image, etc etc, the logo is still opaque. I'd like to do it this way so I can rotate the background images. How do I fix this? [edit]I've cooked up an example image: http://i.imgur.com/XtoGn.png The left is what I want to happen, the right is what happens on all browsers (I know the background isn't transparent but bear with me - they're both transparent pngs, with the background having a gradient layer mask). I've put the images like this <div> <img id="backgroundImg" style="position: absolute; top: 0;" src="/Images/background.png" /> <img id="logoImg" src="/Images/logo.png" /> </div> I'm not entirely sure what blending mode I'm using in PS.

    Read the article

  • How to change the opacity (alpha, transparency) of an element in a canvas element after it has been

    - by Joe Lencioni
    Using the HTML5 <canvas> element, I would like to load an image file (PNG, JPEG, etc.), draw it to the canvas completely transparently, and then fade it in. I have figured out how to load the image and draw it to the canvas, but I don't know how to change its opacity once it as been drawn. Here's the code I have so far: var canvas = document.getElementById('myCanvas'); if (canvas.getContext) { var c = canvas.getContext('2d'); c.globalAlpha = 0; var img = new Image(); img.onload = function() { c.drawImage(img, 0, 0); } img.src = 'image.jpg'; } Will somebody please point me in the right direction like a property to set or a function to call that will change the opacity? Thanks!

    Read the article

  • Does Unity's "Transparent Bumped Specular" translate to "semi-shiny must be semi-transparent"?

    - by Shivan Dragon
    Unity's documentation for the "Transparent Bumped Specular" shader/material-type is simply a concatenation of each of the descriptions for its Transparent and Specular Shaders (and also Bumped, but that doesn't apply to the question): Transparent Properties This shader can make mesh geometry partially or fully transparent by reading the alpha channel of the main texture. In the alpha, 0 (black) is completely transparent while 255 (white) is completely opaque. If your main texture does not have an alpha channel, the object will appear completely opaque. (...) Specular Properties (...) Additionally, the alpha channel of the main texture acts as a Specular Map (sometimes called "gloss map"), defining which areas of the object are more reflective than others. Black areas of the alpha will be zero specular reflection, while white areas will be full specular reflection. To me this translates to: I have a mesh representig a car tire The texture need to be very shiny on the rims parts, and almost not shiny at all for the rubber parts Also since the rim is really complex, (with like cut-out decoretions and such), I will not build that into the mesh, but fake it with transparency in the texture I can't do all this using Unity's "Transparent Bumped Specular" shader, because the "rubber" part of the texture will become semi transparent due to me painting the alpha channel dark-grey (because I want it to also be less shiny). Is this correct? If not, how can I make this work?

    Read the article

  • How to set a key binding to make Emacs as transparent/opaque as I want?

    - by Vivi
    I want to have a command in Emacs to make it as opaque/transparent as I want (refer to the fabulous question that pointed out that transparency is possible in Emacs, and the EmacsWiki page linked there which has the code I am using below). The EmacsWiki code sets "C-c t" to toggle the previously set transparency on and off: ;;(set-frame-parameter (selected-frame) 'alpha '(<active> [<inactive>])) (set-frame-parameter (selected-frame) 'alpha '(85 50)) (add-to-list 'default-frame-alist '(alpha 85 50)) enter code here(eval-when-compile (require 'cl)) (defun toggle-transparency () (interactive) (if (/= (cadr (find 'alpha (frame-parameters nil) :key #'car)) 100) (set-frame-parameter nil 'alpha '(100 100)) (set-frame-parameter nil 'alpha '(85 60)))) (global-set-key (kbd "C-c t") 'toggle-transparency) What I would like to do is to be able to choose the % transparency when I am in Emacs. If possible, I would like a command where I type for example "C-c t N" (where N is the % opaqueness) for the active frame, and then "M-c t N" for the inactive window. If that can't be done like that, then maybe a command where if I type "C-c t" it asks me for the number which gives the opaqueness of the active window (and the same for the inactive window using "M-c t"). Thanks in advance for your time :) Below are just some comments that are not important to answer the question if you are not interested: I really want this because when I told my supervisor I was learning Emacs he said TexShop is much better and that I am using software from the 80's. I told him about the wonders of Emacs and he said TexShop has all of it and more. I matched everything he showed me except for the transparency (though he couldn't match the preview inside Emacs from preview-latex). I found the transparency thing by chance, and now I want to show him Emacs rules! I imagine this will be a piece of cake for some of you, and even though I could get it done if I spent enough time trying to learn lisp or reading around, I am not a programmer and I have only been using Emacs and a mac for a week. I am lost already as it is! So thanks in advance for your time and help - I will learn lisp eventually!

    Read the article

  • How to do proper Alpha in XNA?

    - by Soshimo
    Okay, I've read several articles, tutorials, and questions regarding this. Most point to the same technique which doesn't solve my problem. I need the ability to create semi-transparent sprites (texture2D's really) and have them overlay another sprite. I can achieve that somewhat with the code samples I've found but I'm not satisfied with the results and I know there is a way to do this. In mobile programming (BREW) we did it old school and actually checked each pixel for transparency before rendering. In this case it seems to render the sprite below it blended with the alpha above it. This may be an artifact of how I'm rendering the texture but, as I said before, all examples point to this one technique. Before I go any further I'll go ahead and paste my example code. public void Draw(SpriteBatch batch, Camera camera, float alpha) { int tileMapWidth = Width; int tileMapHeight = Height; batch.Begin(SpriteSortMode.Texture, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone, null, camera.TransformMatrix); for (int x = 0; x < tileMapWidth; x++) { for (int y = 0; y < tileMapHeight; y++) { int tileIndex = _map[y, x]; if (tileIndex != -1) { Texture2D texture = _tileTextures[tileIndex]; batch.Draw( texture, new Rectangle( (x * Engine.TileWidth), (y * Engine.TileHeight), Engine.TileWidth, Engine.TileHeight), new Color(new Vector4(1f, 1f, 1f, alpha ))); } } } batch.End(); } As you can see, in this code I'm using the overloaded SpriteBatch.Begin method which takes, among other things, a blend state. I'm almost positive that's my problem. I don't want to BLEND the sprites, I want them to be transparent when alpha is 0. In this example I can set alpha to 0 but it still renders both tiles, with the lower z ordered sprite showing through, discolored because of the blending. This is not a desired effect, I want the higher z-ordered sprite to fade out and not effect the color beneath it in such a manner. I might be way off here as I'm fairly new to XNA development so feel free to steer me in the correct direction in the event I'm going down the wrong rabbit hole. TIA

    Read the article

  • Use native HBitmap in C# while preserving alpha channel/transparency. Please check this code, it works on my computer...

    - by David
    Let's say I get a HBITMAP object/handle from a native Windows function. I can convert it to a managed bitmap using Bitmap.FromHbitmap(nativeHBitmap), but if the native image has transparency information (alpha channel), it is lost by this conversion. There are a few questions on Stack Overflow regarding this issue. Using information from the first answer of this question (How to draw ARGB bitmap using GDI+?), I wrote a piece of code that I've tried and it works. It basically gets the native HBitmap width, height and the pointer to the location of the pixel data using GetObject and the BITMAP structure, and then calls the managed Bitmap constructor: Bitmap managedBitmap = new Bitmap(bitmapStruct.bmWidth, bitmapStruct.bmHeight, bitmapStruct.bmWidth * 4, PixelFormat.Format32bppArgb, bitmapStruct.bmBits); As I understand (please correct me if I'm wrong), this does not copy the actual pixel data from the native HBitmap to the managed bitmap, it simply points the managed bitmap to the pixel data from the native HBitmap. And I don't draw the bitmap here on another Graphics (DC) or on another bitmap, to avoid unnecessary memory copying, especially for large bitmaps. I can simply assign this bitmap to a PictureBox control or the the Form BackgroundImage property. And it works, the bitmap is displayed correctly, using transparency. When I no longer use the bitmap, I make sure the BackgroundImage property is no longer pointing to the bitmap, and I dispose both the managed bitmap and the native HBitmap. The Question: Can you tell me if this reasoning and code seems correct. I hope I will not get some unexpected behaviors or errors. And I hope I'm freeing all the memory and objects correctly. private void Example() { IntPtr nativeHBitmap = IntPtr.Zero; /* Get the native HBitmap object from a Windows function here */ // Create the BITMAP structure and get info from our nativeHBitmap NativeMethods.BITMAP bitmapStruct = new NativeMethods.BITMAP(); NativeMethods.GetObjectBitmap(nativeHBitmap, Marshal.SizeOf(bitmapStruct), ref bitmapStruct); // Create the managed bitmap using the pointer to the pixel data of the native HBitmap Bitmap managedBitmap = new Bitmap( bitmapStruct.bmWidth, bitmapStruct.bmHeight, bitmapStruct.bmWidth * 4, PixelFormat.Format32bppArgb, bitmapStruct.bmBits); // Show the bitmap this.BackgroundImage = managedBitmap; /* Run the program, use the image */ MessageBox.Show("running..."); // When the image is no longer needed, dispose both the managed Bitmap object and the native HBitmap this.BackgroundImage = null; managedBitmap.Dispose(); NativeMethods.DeleteObject(nativeHBitmap); } internal static class NativeMethods { [StructLayout(LayoutKind.Sequential)] public struct BITMAP { public int bmType; public int bmWidth; public int bmHeight; public int bmWidthBytes; public ushort bmPlanes; public ushort bmBitsPixel; public IntPtr bmBits; } [DllImport("gdi32", CharSet = CharSet.Auto, EntryPoint = "GetObject")] public static extern int GetObjectBitmap(IntPtr hObject, int nCount, ref BITMAP lpObject); [DllImport("gdi32.dll")] internal static extern bool DeleteObject(IntPtr hObject); }

    Read the article

  • Inkscape: Copying an object, retaining transparency

    - by dpk
    I'm looking for a way to copy objects from one window to another without losing the surrounding transparency. I have two Inkscape windows. The setup is pretty simple. In the first window I draw a filled circle and a filled rectangle in it, with the circle set on top of the rectangle to show that the area around the circle is transparent (that is, you can see the rectangle "under" the circle, see screenshot 1, left). In the second window I just drew a filled rectangle (screenshot 1, right). When I copy the circle from window 1 to window 2 the transparency around the circle is lost (screenshot 2). I've verified that the backgrounds of the documents are 0% alpha/white. This is a rather contrived example but is readily reproducible. The real graphics I am working with have a bunch of objects all in a single group, but I have the same results. I feel like I'm missing something. The circle no longer behaves like a circle at its destination. Instead, it acts kind of like a bitmap. I'm definitely not using the bitmap copy feature.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >