Search Results

Search found 246 results on 10 pages for 'bitmaps'.

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

  • A device specific alpha bitmap fails after switching resolutions in remote desktop

    - by Bob
    All my alpha bitmaps, created using CreateCompatibleBitmap(..), start to receive an error code 87 after someone signs in with Remote Desktop. I am assuming that this is because the resolution changed and I am using a device specific bitmap. I am wondering what the best route is to fix this issue without migrating to a device independent bitmap? Some options are: 1) Detect remote desktop change and flag all bitmaps to be reloaded (I have done this but it does not work as well as I would like). 2) Wait for error code 87 to happen on an alphablend image that previously worked, and then reload it (was going to try this next, im sure it will work, but a little hacky) 3) Detect random event such as WM_DISPLAYCHANGE or _ that tells me when I should do this (ie: a device change event I'm guessing, or maybe something more specific?) 4) _? Thanks for any help in advance

    Read the article

  • Best way to reverse bitmap data that is upside down

    - by Wladimir
    Hello, I have a method that I call and it returns bitmap data from a capture device. It returns a pointer to the buffer data as an IntPtr and the buffer length as an int. I know in advance that this bitmap is a 24bpp and its width and height. The problem is that the buffer contains the bitmap data upside down and I need this data to be in the right order (reverse it). What I do is create a for loop and using CopyMemory, I copy each line (stride) of this data from bottom to up to a newly allocated memory space. Is there any way to make it faster than creating more memory each time I receive a new frame? It makes the application get a bit slow and consumes more memory as each bitmap is pretty big. I do this because I use another component that analyses the bitmaps and it doesn't work propertly if the bitmaps are upside down. I'm using .net, c# thanks!

    Read the article

  • How can I dispose of an object (say a Bitmap) when it becomes orphaned ?

    - by Jelly Amma
    I have a class A providing Bitmaps to other classes B, C, etc. Now class A holds its bitmaps in a ring queue so after a while it will lose reference to the bitmap. While it's still in the queue, the same Bitmap can be checked out by several classes so that, say, B and C can both hold a reference to this same Bitmap. But it can also happen that only one of them checked out the Bitmap or even none of them. I would like to dispose of the bitmap when it's not being needed any more by either A, B or C. I suppose I have to make B and C responsible for somehow signaling when they're finished using it but I'm not sure about the overall logic. Should it be a call to something like DisposeIfNowOrphan() that would be called : 1 - when the Bitmap gets kicked out of the queue in class A 2 - when B is finished with it 3 - when C is finished with it If that's the best strategy, how can I evaluate the orphan state ? Any advice would be most welcome.

    Read the article

  • How can I fix this touch event / draw loop "deadlock"?

    - by Josh
    Just want to start out by saying this seems like a great site, hope you guys can help! I'm trying to use the structure laid out in LunarLander to create a simple game in which the user can drag some bitmaps around on the screen (the actual game is more complex, but that's not important). I ripped out the irrelevant parts of LanderLander, and set up my own bitmap drawing, something like BoardThread (an inner class of BoardView): run() { while(mRun) { canvas = lockSurfaceHolder... syncronized(mSurfaceHolder) { /* drawStuff using member position fields in BoardView */ } unlockSurfaceHolder } } My drawStuff simply walks through some arrays and throws bitmaps onto the canvas. All that works fine. Then I wanted to start handling touch events so that when the user presses a bitmap, it is selected, when the user unpresses a bitmap, it is deselected, and if a bitmap is selected during a touch move event, the bitmap is dragged. I did this stuff by listening for touch events in the BoardView's parent, BoardActivity, and passing them down into the BoardView. Something like In BoardView handleTouchEvent(MotionEvent e) { synchronized(mSurfaceHolder) { /* Modify shared member fields in BoardView so BoardThread can render the bitmaps */ } } This ALSO works fine. I can drag my tiles around the screen no problem. However, every once in a while, when the app first starts up and I trigger my first touch event, the handleTouchEvent stops executing at the synchronized line (as viewed in DDMS). The drawing loop is active during this time (I can tell because a timer changes onscreen), and it usually takes several seconds or more before a bunch of touch events come through the pipeline and everything is fine again. This doesn't seem like deadlock to me, since the draw loop is constantly going in and out of its syncronized block. Shouldn't this allow the event handling thread to grab a lock on mSurfaceHolder? What's going on here? Anyone have suggestions for improving how I've structured this? Some other info. This "hang" only ever occurs on first touch event after activity start. This includes on orientation change after restoreState has been called. Also, I can remove EVERYTHING within the syncronized block in the event handler, and it will still get hung up at the syncronized call. Thanks!

    Read the article

  • explain this macro

    - by deostroll
    #define __T(x) L ## x Found in code from one of the MFC source header file. It is mostly used for converting strings to ........ (I don't know what). If I am correct it converts strings to LPCTSTR...don't know what that type is either... I can't seem to convert char* into LPCTSTR. While MFC file handling, the following code will always return error while trying to open the file... char* filepath = "C:\\Program Files\\Microsoft Office\\Office12\\BITMAPS\\STYLES\\GLOBE.WMF"; if( !file.Open((LPCTSTR)filepath , CFile::modeRead, &fexp) ) { fexp.ReportError(); return 1; } But instead if I wrote it this way, it doesn't give error: if( !file.Open( _T("C:\\Program Files\\Microsoft Office\\Office12\\BITMAPS\\STYLES\\GLOBE.WMF") , CFile::modeRead, &fexp) ) { fexp.ReportError(); return 1; } I am looking at passing a variable as the first argument to the CFile::Open() method.

    Read the article

  • Access WindowedApplication from package class.

    - by Senling
    Hi, I'm developing an AIR application, where i need to access WindowedApplication's function from the package class. This is the Main application (Partial code) import mx.events.CloseEvent; import messages.MessageWindow public function undock():void { stage.nativeWindow.visible = true; stage.nativeWindow.orderToFront(); //Clearing the bitmaps array also clears the applcation icon from the systray NativeApplication.nativeApplication .icon.bitmaps = []; } ]] Package: (Partial code) package messages { public class MessageWindow extends NativeWindow { public function MessageWindow():void { stage.addEventListener(MouseEvent.MOUSE_DOWN,onClick); } private function onClick(event:MouseEvent):void { ****** Need to call the undock method from here. ***** } } } Is it possible to call this way or suggest any other solution Thanks in advance Senling.

    Read the article

  • Create bitmap font using C#

    - by developer
    Hi All, I have list of bitmaps (for each letter) and i have to create font using those bitmaps. I know ttf format is very very complicated to create, so i want to create fon file (raster bitmap font). I understand it can be created by create a dll and rename it from *.dll to *.fon, or something similiar. No code sample or any knonledge about it in the web!!!! Can you help me??? it should be C# code. Thanks a lot!!!!

    Read the article

  • Google I/O 2011: Memory management for Android Apps

    Google I/O 2011: Memory management for Android Apps Patrick Dubroy Android apps have more memory available to them than ever before, but are you sure you're using it wisely? This talk will cover the memory management changes in Gingerbread and Honeycomb (concurrent GC, heap-allocated bitmaps, "largeHeap" option) and explore tools and techniques for profiling the memory usage of Android apps. From: GoogleDevelopers Views: 5698 45 ratings Time: 58:42 More in Science & Technology

    Read the article

  • Download NPlot .NET charting library

    - by Editor
    NPlot is a .NET charting library for .NET. And, it is available as freeware. NPlot features an useful and flexible API. Also, NPlot includes controls for ASP.NET and Windows Forms, as well as a class for creating Bitmaps. Learn from a few examples. Download NPlot.

    Read the article

  • Help with this optimization

    - by Milo
    Here is what I do: I have bitmaps which I draw into another bitmap. The coordinates are from the center of the bitmap, thus on a 256 by 256 bitmap, an object at 0.0,0.0 would be drawn at 128,128 on the bitmap. I also found the furthest extent and made the bitmap size 2 times the extent. So if the furthest extent is 200,200 pixels, then the bitmap's size is 400,400. Unfortunately this is a bit inefficient. If a bitmap needs to be drawn at 500,500 and the other one at 300,300, then the target bitmap only needs to be 200,200 in size. I cannot seem to find a correct way to draw in the components correctly with a reduced size. I figure out the target bitmap size like this: float AvatarComposite::getFloatWidth(float& remainder) const { float widest = 0.0f; float widestNeg = 0.0f; for(size_t i = 0; i < m_components.size(); ++i) { if(m_components[i].getSprite() == NULL) { continue; } float w = m_components[i].getX() + ( ((m_components[i].getSprite()->getWidth() / 2.0f) * m_components[i].getScale()) / getWidthToFloat()); float wn = m_components[i].getX() - ( ((m_components[i].getSprite()->getWidth() / 2.0f) * m_components[i].getScale()) / getWidthToFloat()); if(w > widest) { widest = w; } if(wn > widest) { widest = wn; } if(w < widestNeg) { widestNeg = w; } if(wn < widestNeg) { widestNeg = wn; } } remainder = (2 * widest) - (widest - widestNeg); return widest - widestNeg; } And here is how I position and draw the bitmaps: int dw = m_components[i].getSprite()->getWidth() * m_components[i].getScale(); int dh = m_components[i].getSprite()->getHeight() * m_components[i].getScale(); int cx = (getWidth() + (m_remainderX * getWidthToFloat())) / 2; int cy = (getHeight() + (m_remainderY * getHeightToFloat())) / 2; cx -= m_remainderX * getWidthToFloat(); cy -= m_remainderY * getHeightToFloat(); int dx = cx + (m_components[i].getX() * getWidthToFloat()) - (dw / 2); int dy = cy + (m_components[i].getY() * getHeightToFloat()) - (dh / 2); g->drawScaledSprite(m_components[i].getSprite(),0.0f,0.0f, m_components[i].getSprite()->getWidth(),m_components[i].getSprite()->getHeight(),dx,dy, dw,dh,0); I basically store the difference between the original 2 * longest extent bitmap and the new optimized one, then I translate by that much which I would think would cause me to draw correctly but then some of the components look cut off. Any insight would help. Thanks

    Read the article

  • Easy road from DisplayObject to Molehill?

    - by Bart van Heukelom
    I have a finished Flash game which is rendered using the built-in display tree, i.e. Bitmaps contained in Sprites (and a text here and there, few vector graphics, and one bitmap-filled shape). For extra performance, I'd like it to use Molehill for rendering, but that's not possible out of the box. What's the easiest way to make this game use Molehill when available, but fall back to the current method if it's not available?

    Read the article

  • System occasionally hangs boot process with SLES 11

    - by ThaMe90
    I have several (new) systems on which I had to install SLES11 on. However, after a few (though not every) reboots, the system hangs during the boot sequence. It will only continue after I physically press a key on the keyboard. From what I've found in the dmesg log from a failed boot is the following: [ 22.170276] sd 0:0:0:0: [sda] Mode Sense: b7 00 00 08 [ 22.171155] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 22.182760] sda: sda1 sda2 sda3 [ 22.383424] sd 0:0:0:0: [sda] Attached SCSI disk [ 22.545372] PM: Marking nosave pages: 000000000009a000 - 0000000000100000 [ 22.545377] PM: Marking nosave pages: 00000000bf780000 - 0000000100000000 [ 22.546217] PM: Basic memory bitmaps created [ 22.590380] PM: Basic memory bitmaps freed [ 22.596284] PM: Starting manual resume from disk [ 22.602319] PM: Resume from partition 8:1 [ 22.602321] PM: Checking hibernation image. [ 22.602479] PM: Error -22 checking image file [ 22.602481] PM: Resume from disk failed. [ 22.718727] kjournald starting. Commit interval 15 seconds [ 22.718960] EXT3-fs (sda3): using internal journal [ 22.718964] EXT3-fs (sda3): mounted filesystem with ordered data mode [ 1555.644404] udevd version 128 started [ 1555.697664] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0 [ 1555.707961] ACPI: Power Button [PWRB] I've looked around the internet for the PM: Resume from disk failed. message, but this seems to only be important when restoring the system after a hybernate, i.e. restore from the hdd. But this is not my situation. I only get this after a reboot, as I said before. The timestamp [ 1555.xxxxxx] is only the result of me pressing a key on the keyboard. Any suggestions on how to proceed? As I am getting stuck on this issue.

    Read the article

  • Android Game Development. Async Task. Loading Bitmap Images Sounds

    - by user2534694
    Im working on this game for android. And wanted to know if my thread architecture was right or wrong. Basically, what is happening is, i am loading All the bitmaps,sounds etc in the initializevariables() method. But sometimes the game crashes and sometimes it doesnt. So i decided to use async task. But that doesnt seem to work either (i too loads at times and crashes at times) @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setFullScreen(); initializeVariables(); new initVariables().execute(); // setContentView(ourV); } private void setFullScreen() { requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON ); } private void initializeVariables() { ourV=new OurView(this); stats = getSharedPreferences(filename, 0); ballPic = BitmapFactory.decodeResource(getResources(), R.drawable.ball5); platform = BitmapFactory.decodeResource(getResources(), R.drawable.platform3); gameB = BitmapFactory.decodeResource(getResources(), R.drawable.game_back2); waves = BitmapFactory.decodeResource(getResources(), R.drawable.waves); play = BitmapFactory.decodeResource(getResources(), R.drawable.play_icon); pause = BitmapFactory.decodeResource(getResources(), R.drawable.pause_icon); platform2 = BitmapFactory.decodeResource(getResources(), R.drawable.platform4); countdown = BitmapFactory.decodeResource(getResources(), R.drawable.countdown); bubbles = BitmapFactory.decodeResource(getResources(), R.drawable.waves_bubbles); backgroundMusic = MediaPlayer.create(this, R.raw.music); jump = MediaPlayer.create(this, R.raw.jump); click = MediaPlayer.create(this, R.raw.jump_crack); sm = (SensorManager) getSystemService(SENSOR_SERVICE); acc = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); sm.registerListener(this, acc, SensorManager.SENSOR_DELAY_GAME); ourV.setOnTouchListener(this); dialog = new Dialog(this,android.R.style.Theme_Translucent_NoTitleBar_Fullscreen); dialog.setContentView(R.layout.pausescreen); dialog.hide(); dialog.setOnDismissListener(this); resume = (Button) dialog.findViewById(R.id.bContinue); menu = (Button) dialog.findViewById(R.id.bMainMenu); newTry = (Button) dialog.findViewById(R.id.bNewTry); tv_time = (TextView) dialog.findViewById(R.id.tv_time); tv_day = (TextView) dialog.findViewById(R.id.tv_day); tv_date = (TextView) dialog.findViewById(R.id.tv_date); resume.setOnClickListener(this); menu.setOnClickListener(this); newTry.setOnClickListener(this); } @Override protected void onResume() { //if its running the first time it goes in the brackets if(firstStart) { ourV.onResume(); firstStart=false; } } Now what onResume in ourV does is , its responsible for starting the thread //this is ourV.onResume public void onResume() { t=new Thread(this); isRunning=true; t.start(); } Now what I want is to initialise all bitmaps sounds etc in the async background method public class initVariables extends AsyncTask<Void, Integer, Void> { ProgressDialog pd; @Override protected void onPreExecute() { pd = new ProgressDialog(GameActivity.this); pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); pd.setMax(100); pd.show(); } @Override protected Void doInBackground(Void... arg0) { synchronized (this) { for(int i=0;i<20;i++) { publishProgress(5); try { Thread.sleep(89); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } return null; } @Override protected void onProgressUpdate(Integer... values) { pd.incrementProgressBy(values[0]); } @Override protected void onPostExecute(Void result) { pd.dismiss(); setContentView(ourV); } } Now since I am new to this. You could tellme maybe if async is not required for such stuff and there is another way of doing it normally.

    Read the article

  • Right way to dispose Image/Bitmap and PictureBox

    - by kornelijepetak
    I am trying to develop a Windows Mobile 6 (in WF/C#) application. There is only one form and on the form there is only a PictureBox object. On it I draw all desired controls or whatever I want. There are two things I am doing. Drawing custom shapes and loading bitmaps from .png files. The next line locks the file when loading (which is an undesired scenario): Bitmap bmp = new Bitmap("file.png"); So I am using another way to load bitmap. public static Bitmap LoadBitmap(string path) { using (Bitmap original = new Bitmap(path)) { return new Bitmap(original); } } This is I guess much slower, but I don't know any better way to load an image, while quickly releasing the file lock. Now, when drawing an image there is method that I use: public void Draw() { Bitmap bmp = new Bitmap(240,320); Graphics g = Graphics.FromImage(bmp); // draw something with Graphics here. g.Clear(Color.Black); g.DrawImage(Images.CloseIcon, 16, 48); g.DrawImage(Images.RefreshIcon, 46, 48); g.FillRectangle(new SolidBrush(Color.Black), 0, 100, 240, 103); pictureBox.Image = bmp; } This however seems to be some kind of a memory leak. And if I keep doing it for too long, the application eventually crashes. Therefor, I have X questions: 1.) What is the better way for loading bitmaps from files without locking the file? 2.) What objects needs to be manually disposed in the Draw() function (and in which order) so there's no memory leak and no ObjectDisposedException throwing? 3.) If pictureBox.Image is set to bmp, like in the last line of the code, would pictureBox.Image.Dispose() dispose only resources related to maintaining the pictureBox.Image or the underlying Bitmap set to it?

    Read the article

  • How do I keep from running out of memory on graphics for an Android app?

    - by user279112
    I've been working on an Android app in Eclipse, and so far, my program hasn't really grown past midget size. However I've already run into an issue with an Out of Memory error. You see, I've been using graphics comprised solely of bitmaps and PNGs in this program, and recently, when I tried to add a little bit more functionality to the program (mainly including a few more bitmaps and causing an extra sprite to be created), it started crashing in the graphics thread's constructor - sprite's constructor. When I tracked the problem down, it turned out to be an Out of Memory error that is seemingly caused by adding too many picture files to the program and creating Drawables out of them. This would be a problem, as I really don't have that many picture resources worked into that program...maybe 20 or so. I haven't even started to include sound yet. These images aren't all that fancy. My questions are this: 1) Are programs for the Android phone really that limited on how much memory they can employ, or is it probably something other than the 20-30 resource pictures causing that error? 2) If the memory for Android apps is so awful it can't even handle 20-30 picture resources being loaded into Drawables that exist at the same time, then how in the world are you supposed to make decent graphics and sound for that thing? Thanks.

    Read the article

  • Converting a view to Bitmap without displaying it in Android?

    - by sunil
    Hi, I will try to explain what exactly I need to do. I have 3 separate screens say A,B,C. There is another screen called say HomeScreen where all the 3 screens bitmap should be displayed in Gallery view and the user can select in which view does he wants to go. I have been able to get the Bitmaps of all the 3 screens and display it in Gallery view by placing all the code in HomeScreen Activity only. Now, this has complicated the code a lot and I will like to simplify it. So, can I call another Activity from HomeScreen and do not display it and just get the Bitmap of that screen. For example, say I just call HomeScreen and it calls Activity A,B,C and none of the Activities from A,B,C are displayed. It just gives the Bitmap of that screen by getDrawingCache(). And then we can display those bitmaps in Gallery view in HomeScreen. I hope I have explained the problem very clearly. Please let me know if this is actually possible. Regards Sunil

    Read the article

  • Can't recover hard drive

    - by BreezyChick89
    My drive got corrupt after a thunderstorm. It used to be 1 partition of 2.5tb but now it shows 2 partitions. It's weird because 300gig free space is about how much it had before corrupting, but it was part of the first partition. I tried $ sudo resize2fs -f /dev/sdb1 Resizing the filesystem on /dev/sdb1 to 536870911 (4k) blocks. resize2fs: Can't read an block bitmap while trying to resize /dev/sdb1 Please run 'e2fsck -fy /dev/sdb1' to fix the filesystem after the aborted resize operation. sudo e2fsck -f /dev/sdb1 e2fsck 1.42 (29-Nov-2011) The filesystem size (according to the superblock) is 610471680 blocks The physical size of the device is 536870911 blocks Either the superblock or the partition table is likely to be corrupt! Abort? n .... Error reading block 537395215 (Invalid argument) while reading inode and block bitmaps. Ignore error<y>? yes Force rewrite<y>? yes Error writing block 537395215 (Invalid argument) while reading inode and block bitmaps. Ignore error<y>? yes ... A lot of these. I can't use e2fsck -y because the first question aborts if I say "y". If I put a weight on the 'y' key it fails because none of the errors were really fixed. I asked this question before and tried using gparted but gparted fails because the first thing it does is: e2fsck -f -y -v /dev/sdb1 giving the same error. The disk status says healthy. There are no bad blocks. This is very frustrating because I can see the data in testdisk and it looks like it's all there. I already bought another 2.5tb drive and made a clone using dd. The next step if I can't fix this is to wipe that drive and just move the data with testdisk, but it seems certain folders will copy infinitely until the drive is full because of symlinks or errors so it's also a difficult option. sudo fdisk -l Disk /dev/sdb: 2500.5 GB, 2500495958016 bytes 255 heads, 63 sectors/track, 304001 cylinders, total 4883781168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x0005da5e Device Boot Start End Blocks Id System /dev/sdb1 * 2048 4294969342 2147483647+ 83 Linux sudo badblocks -b 4096 -n -o badfile /dev/sdb 610471680 536870911 badfile is empty I also tried changing the superblock with "fsck -b" but all of them are the same.

    Read the article

  • VG.net 8.5 Released

    - by Frank Hileman
    We have released version 8.5 of the VG.net vector graphics system. This release supports Visual Studio 2013. Companies who purchased a VG.net license after October 1, 2013, are eligible for a free upgrade. We will be sending you an email. There is one cosmetic problem which wasted our time, as we could not find a work around. It occurs when your display is set to a high DPI. You can see the problem in the image of the toolbox below, which uses a DPI of 125%, on Windows 7: The ToolboxItem class accepts only Bitmaps with a size of 16x16. We tried many sizes and many bitmap formats. As you can see, this tiny Bitmap is then scaled by the toolbox, and the scaling algorithm adds artifacts. This is an "improvement" Microsoft recently added to Visual Studio 2013.

    Read the article

  • How to repair ods files

    - by karthick87
    I have few ods files but all of a sudden it is not opening. When i open the file i get the following error. Please look at the below snapshot Error on opening the file with Archive Manager: karthick@karthick:/media/Datas$ zip -FF data.ods --out repaired_file.ods Fix archive (-FF) - salvage what can Found end record (EOCDR) - says expect single disk archive Scanning for entries... copying: mimetype (46 bytes) copying: Configurations2/statusbar/ (0 bytes) copying: Configurations2/accelerator/current.xml (2 bytes) copying: Configurations2/floater/ (0 bytes) copying: Configurations2/popupmenu/ (0 bytes) copying: Configurations2/progressbar/ (0 bytes) copying: Configurations2/menubar/ (0 bytes) copying: Configurations2/toolbar/ (0 bytes) copying: Configurations2/images/Bitmaps/ (0 bytes) copying: content.xml zip warning: no end of stream entry found: content.xml zip warning: rewinding and scanning for later entries

    Read the article

  • The perfect crossfade

    - by epologee
    I find it hard to describe this problem in words, which is why I made a video (45 seconds) to illustrate it. Here's a preview of the questions, please have a look at it on Vimeo: http://vimeo.com/epologee/perfect-crossfade The issue of creating a flawless crossfade or dissolve of two images or shapes has been recurring to me in a number of fields over the last decade. First in video editing, then in Flash animation and now in iOS programming. When you start googling it, there are many workarounds to be found, but I really want to solve this without a hack this time. The summary: What is the name of the technique or curve to apply in crossfading two semi-transparent, same-colored bitmaps, if you want the resulting transparency to match the original of either one? Is there a (mathematical) function to calculate the neccessary partial transparency/alpha values during the fade? Are there programming languages that have these functions as a preset, similar to the ease in, ease out or ease in out functions found in ActionScript or Cocoa?

    Read the article

  • why not use unmanaged safe code in c#

    - by user613326
    There is an option in c# to execute code unchecked. It's generally not advised to do so, as managed code is much safer and it overcomes a lot of problems. However I am wondering, if you're sure your code won't cause errors, and you know how to handle memory then why (if you like fast code) follow the general advice? I am wondering this since I wrote a program for a video camera, which required some extremely fast bitmap manipulation. I made some fast graphical algorithms myself, and they work excellent on the bitmaps using unmanaged code. Now I wonder in general, if you're sure you don't have memory leaks, or risks of crashes, why not use unmanaged code more often ? PS my background: I kinda rolled into this programming world and I work alone (I do so for a few years) and so I hope this software design question isn't that strange. I don't really have other people out there like a teacher to ask such things.

    Read the article

  • Can SpriteBatch be used to fill a polygon with a texture?

    - by can poyrazoglu
    I basically need to fill a texture into a polygon using the SpriteBatch. I've done some research but couldn't find anything useful except polygon triangulation method, which works well only with convex polygons (without diving into super math which is definitely not something I'm pretty good at). Are there any solutions for filling in a polygon in a basic way? I of course need something dynamic (I'll have a map editor that you can define polygons, and the game will render them (and collision detection will also use them but that's off topic), basically I can't accept solutions like "pre-calculated" bitmaps or anything like that. I need to draw a polygon with the segments provided, to the screen, using the SpriteBatch.

    Read the article

  • Can Win32 message loops survive being ported to native linux?

    - by Chris Cochran
    I would like to port a large Win32 DLL to native linux in C++. I don't think I can use Wine for a DLL like mine, because users of the DLL would then also have to be in Wine, and then they would all whine... As a Windows C++ programmer, I don't (yet) have any familiarity with the GUI front-end services in linux, but if it logically runs on anything like win32 message loops, fonts, bitmaps, invalidation regions, getmessage( ) calls and so forth, it should be a fairly straight forward remapping of my existing code. So what am I looking at here, a remap or a rewrite? The path for such things must be well worn by now.

    Read the article

  • How can I set 'Print to File' as my default printing option?

    - by edm
    At the moment when I print, my Deskjet-3050 is selected as the default printer. I would like 'Print to File' to be the default 'printer' without using cups-pdf I specifically do not want to use cups-pdf because of the way it renders text (see below). I am not entirely sure what it is doing but it seems as though it renders the text as bitmaps and embeds them in pdf (as I am not able to highlight/copy/search embedded text as I am using a standard Print to File pdf). N.B. this is not a dupe of: Can I make PDF the default for 'print to file'

    Read the article

  • Setting density for Android game

    - by Asghar
    I am developing an Android game, in which a ball (bitmap) translates( is in motion). So I have provided motion equations for the ball. I have checked my app on Samsung galaxy S2 whose actual density is roundly 252 dpi, and It works fine on that. So my question is that Does these motions of bitmaps in surfaceView, depends on actual density of phone( i.e 252 dpi for S2) or generalized density(i.e 240 dpi). I am confused whether if I run this app on 235 dpi smartphone, So will it have the same performance of motion as it is on Galaxy S2( with 252 dpi) or it would be little slow ? Any help will be appreciated.

    Read the article

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