Search Results

Search found 5806 results on 233 pages for 'graphics'.

Page 157/233 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • Java - Console-like web applet.

    - by Dean
    Hey, I've been developing an application in the windows console with Java, and want to put it online in all of its console-graphics-glory. Is there a simple web applet API I can use to port my app over? I'm just using basic System.out and System.in functionality, but I'm happy to rebuild my I/O wrappers. I think something along these lines would be a great asset to any beginning Java developers who want to put their work online.

    Read the article

  • Preserving Bitmap values when creating a new Bitmap from System.Drawing.Image

    - by Otaku
    I'm trying to create a resized image from a bitmap, set a new height/width and a new resolution and save it to PNG. I can do this either from directly A) Image.FromFile(filename) or B) New Bitmap(imageSource) to create the the A Bitmap to be passed to B. Both work okay schmokay, but A does not allow me to set a new width/height on creation (but it does allow me to preserve values with useIcm=True) and B does not allow me to preseve values. Okay, now on to some code and examples: Dim sourceBitmap As New Bitmap(imagePath & myImage1Name) <-not good at all (#1 overload). Doesn't preserve things like HorizontalResolution or PixelFormat on .Save Dim sourceBitmap2 As Bitmap = Image.FromFile(imagePath & myImage1Name, True) <-not good (#5 overload). it does preserve things like HorizontalResolution or PixelFormat on .Save, but it doesn't allow me to initialize image at a new size. Dim targetBitmap As New Bitmap(sourceBitmap2, newWidth, newHeight) <-not good. Even though sourceBitmap2 (see #2 above) was initialized with useIcm=True, it doesn't matter once I've passed it in as the source in targetBitmap. Basically, I'm looking for a way to contruct a New Bitmap with both something like useIcm=True and set the width/height at the same time (Width/Height are read-only properties once it's created). I've gone down the Graphics.DrawImage route as well and it's the same - Graphics.FromImage(sourceBitmap) does not preserve values. Why do I need these values to be preserved? Because I need to convert these pictures to PNG (for file size) with a new resolution and keep the same physical dimensions (w/h in inches) for printing. I know the new pixel width/height needed based on the resolution values I'll pass in with .SetResolution(xDpi,yDpi) to preserve physical dimensions, so that's not the problem. The issue is things like the PixelFormatSize need to remain unchanged (yes, I've tried EncoderParameters - they don't work. I can give you the gory details if you like, but suffice it to say for now, they just don't work). Whew, got that off my chest! Okay, anyone who really knows how all this works can help?

    Read the article

  • Dog ear effect in flex?

    - by donpal
    I've used the graphics package before, but not sure if this can be done. I'm trying to create a dog ear effect programmatically with flex. Can it be done? If not possible, what other options or libraries do I have.

    Read the article

  • How can you save Cocos2D window output as Video?

    - by crunchyt
    I am considering using the excellent looking Cocos2d for a motion graphics project. However, Cocos2d is intended for games, rather than producing an MPEG stream. Is it possible to save the output from a Cocos2d script to a MOV or MPG file? Ideally this needs to be done in a direct manner, not using a screen capture as this would not meet the requirements of the project. Hopefully there are some cocos2d gurus out there :D Thanks!

    Read the article

  • OpenGL Layer on top of Video on iPhone?

    - by FlorianZ
    Hi there. I am trying to display a fullscreen video on the iPhone and overlay it with an OpenGL ES view. So basically, I want a video playing in the background, while there are OpenGL graphics being drawn on top of it. How do I achieve this and is it even possible? Thanks for your help! Florian

    Read the article

  • Basic unit of Sound?

    - by anon
    If we consider computer graphics to be the art of image synthesis where the basic unit is a pixel. What is the basic unit of sound synthesis? [This relates to programming as I want to generate this via a computer program.] Thanks!

    Read the article

  • How to scale JPEG image down so that text is clear as possible?

    - by Juha Syrjälä
    I have some JPEG images that I need scale down to about 80% of original size. Original image dimension are about 700px × 1000px. Images contain some computer generated text and possibly some graphics (similar to what you would find in corporate word documents). How to scale image so that the text is as legible as possible? Currently we are scaling the imaeg down using bicubic interpolation, but that makes the text blurry and foggy.

    Read the article

  • How to draw mixed-formatted text with .Net 2.0

    - by Baldewin
    Hi, is there a way to draw mixed-formatted text in .Net 2.0? I'm looking for something similar to System.Drawing.Graphics.DrawString() My problem with this method is that it allows only one format style for the whole text. But I need to draw text that has different format styles (e.g. a part of the text shall be underlined, another part bold and so on). Thanks a lot! Oliver

    Read the article

  • Moving a turtle to the center of a circle.

    - by Maggie
    I've just started using the turtle graphics program, but I can't figure out how to move the turtle automatically to the center of a circle (no matter where the circle is located) without it drawing any lines. I thought I could use the goto.() function but it's too specific and I need something general.

    Read the article

  • HBox Image as BorderSkin

    - by Maurits de Boer
    I've designed a pretty 6pixel border for an HBox. It's a .png file and I tried setting it as the border skin like so: HBox { border-skin: Embed('../graphics/skins/border.png'); } However, when I run the application, the image is used for the background instead of the border. How do I fix this?

    Read the article

  • How to detect OpenGL capabilities without creating a GLSurfaceView (Android)

    - by ADB
    I am trying to access the OpenGL capability of the phone before deciding whether to use OpenGL or Canvas for graphics puposes. However, all the functions that I can read documentation on requires you to already have a valid OpenGL context (namely, create a GLSurfaceView and assign it a rendered. Then check the OpenGL parameters in the onSurfaceCreated). So, is there a way to check the extensions, renderer name and max texture size capability of the phone BEFORE having to create any OpenGL views?

    Read the article

  • Android HelloGoogleMaps to OSMdroid (Open Street Maps)

    - by birgit
    I am trying to reproduce a working HelloGoogleMaps app in Open Street Maps - but I have trouble including the itemized overlay in OSMdroid. I have looked at several resources but I cannot figure out how to fix the error on OsmItemizedOverlay - I guess I am constructing OsmItemizedOverlay wrongly or have a mixup with OsmItemizedOverlay and ItemizedOverlay? But everything I tried to change just raised more errors... "Implicit super constructor ItemizedOverlay() is undefined. Must explicitly invoke another constructor" "Cannot make a static reference to the non-static method setMarker(Drawable) from the type OverlayItem" - I hope someone can help me getting the class definition straight? Thanks so much! package com.example.osmdroiddemomap; import java.util.ArrayList; import android.app.AlertDialog; import android.content.Context; import android.graphics.Point; import android.graphics.drawable.Drawable; import org.osmdroid.api.IMapView; import org.osmdroid.views.*; import org.osmdroid.views.overlay.*; import org.osmdroid.views.overlay.OverlayItem.HotspotPlace; public class OsmItemizedOverlay extends ItemizedOverlay<OverlayItem> { Context mContext; private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>(); //ERRORS are raised by the following 3 lines: public OsmItemizedOverlay(Drawable defaultMarker, Context context) { OverlayItem.setMarker(defaultMarker); OverlayItem.setMarkerHotspot(HotspotPlace.CENTER); mContext = context; } public void addOverlay(OverlayItem overlay) { mOverlays.add(overlay); populate(); } @Override protected OverlayItem createItem(int i) { return mOverlays.get(i); } @Override public int size() { return mOverlays.size(); } protected boolean onTap(int index) { OverlayItem item = mOverlays.get(index); AlertDialog.Builder dialog = new AlertDialog.Builder(mContext); dialog.setTitle(item.getTitle()); dialog.setMessage(item.getSnippet()); dialog.show(); return true; } @Override public boolean onSnapToItem(int arg0, int arg1, Point arg2, IMapView arg3) { // TODO Auto-generated method stub return false; } }

    Read the article

  • Office Web Components compatibility issues

    - by Sebastian
    Hello, I'm doing some research on the convenience of using Office Web Components on a web to show pivot tables and graphics and I have a question regarding this. Does the use of these components will turn my web app (at least for this feature) into a "Internet Explorer only" app Thanks in advance!

    Read the article

  • How to draw on JPanel on fixed position?

    - by kovike
    I have JPanel wrapped in JScrollPane and I want the rectangle to be drawn always on the same position = moving with scrollbars wont affect the visibility of the rectangle. I tried following code: public void paintComponent(Graphics g) { g.setColor(Color.red); g.drawRect(50, (int)getVisibleRect().getY(), 20 , 20); } but it only repaints the rectangle when size of whole JPanel is changed.

    Read the article

  • How does Android emulator performance compare to real device performance?

    - by uj2
    I'm looking into writing an Android game, tough I don't curerntly own an Android device. For those of you who own a device, how does the performance on the emulator relate to real device performance? I'm especially interested in graphics related tasks. This obviously depends on both the machine running the emulator, and the specific device in question, but I'm talking rough numbers here. This question is a duplicate, but since that post is heavily outdated, I figured it's irrelevant by now.

    Read the article

  • Lua and C++: separation of duties

    - by topright
    Please hel to classify ways of organizing C++/Lua game code and to separate their duties. What are the most convenient ways, which one do you use? For example, Lua can be used for initializing C++ objects only or at every game loop iteration. It can be used for game logic only or for graphics, too. Thank you.

    Read the article

  • Best of both worlds: browser and desktop game?

    - by Ricket
    When considering a platform for a game, I've decided on multi-platform (Win/Lin/Mac) but can't make up my mind as far as browser vs. desktop. As I'm not all too far in development, and now having second thoughts, I'd like your opinion! Browser-based games using Java applets: market penetration is reasonably high (for version 6, it's somewhere around 60% I believe?) using JOGL, 3D performance/quality is decent; certainly good enough to render the crappy 3D graphics that I make there's the (small?) possibility of porting something to Android great for an audience of gamers who switch computers often; can sit down at any computer, load a webpage and play it also great for casual gamers or less knowledgeable gamers who are quite happy with playing games in a browser but don't want to install more things to their computer written in a high-level language which I am more familiar with than C++ - but at the same time, I would like to improve my skills with C++ as it is probably where I am headed in the game industry once I get out of school... easier update process: reload the page. Desktop games using good ol' C++ and OpenGL 100% market penetration, assuming complete cross-platform; however, that number reduces when you consider how many people will go through downloading and installing an executable compared to just browsing to a webpage and hitting "yes" to a security warning. more trouble to maintain the cross-platform; but again, for learning purposes I would embrace the challenge and the knowledge I would gain better performance all around true full screen, whereas browser games often struggle with smooth full screen graphics (especially on Linux, in my experience) can take advantage of distribution platforms such as Steam more likely to be considered a "real" game, whereas browser and Java games are often dismissed as not being real games and therefore not played by "hardcore gamers" installer can be large; don't have to worry so much about download times Is there a way to have the best of both worlds? I love Java applets, but I also really like the reasons to write a desktop game. I don't want to constantly port everything between a Java applet project and a C++ project; that would be twice the work! Unity chose to write their own web player plugin. I don't like this, because I am one of the people that will not install their web player for anything, and I don't see myself being able to convince my audience to install a browser plugin. What are my options? Are there other examples out there besides Unity, of games that have browser and desktop versions? Did I leave out anything in the pro/con lists above?

    Read the article

  • iOS equivalent to MacOS NSAttributedString initWithRTF

    - by trekme
    What is an iOS equivalent to MacOS NSAttributedString initWithRTF ? The Application Kit extends Foundation’s NSAttributedString class by adding support for RTF, RTFD, and HTML (with or without attachments), graphics attributes (including font and ruler attributes), methods for drawing attributed strings, and methods for calculating significant linguistic units. - (id)initWithRTF:(NSData *)rtfData documentAttributes:(NSDictionary **)docAttributes I need to process a short stream of RTF data in an iOS application. Thank you!

    Read the article

  • Windows splash screen using GDI+

    - by Luther
    The eventual aim of this is to have a splash screen in windows that uses transparency but that's not what I'm stuck on at the moment. In order to create a transparent window, I'm first trying to composite the splash screen and text on an off screen buffer using GDI+. At the moment I'm just trying to composite the buffer and display it in response to a 'WM_PAINT' message. This isn't working out at the moment; all I see is a black window. I imagine I've misunderstood something with regards to setting up render targets in GDI+ and then rendering them (I'm trying to render the screen using straight forward GDI blit) Anyway, here's the code so far: //my window initialisation code void MyWindow::create_hwnd(HINSTANCE instance, const SIZE &dim) { DWORD ex_style = WS_EX_LAYERED ; //eventually I'll be making use of this layerd flag m_hwnd = CreateWindowEx( ex_style, szFloatingWindowClass , L"", WS_POPUP , 0, 0, dim.cx, dim.cy, null, null, instance, null); SetWindowLongPtr(m_hwnd ,0, (__int3264)(LONG_PTR)this); m_display_dc = GetDC(NULL); //This was sanity check test code - just loading a standard HBITMAP and displaying it in WM_PAINT. It worked fine //HANDLE handle= LoadImage(NULL , L"c:\\test_image2.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); m_gdip_offscreen_bm = new Gdiplus::Bitmap(dim.cx, dim.cy); m_gdi_dc = Gdiplus::Graphics::FromImage(m_gdip_offscreen_bm);//new Gdiplus::Graphics(m_splash_dc );//window_dc ;m_splash_dc //this draws the conents of my splash screen - this works if I create a GDI+ context for the window, rather than for an offscreen bitmap. //For all I know, it might actually be working but when I try to display the contents on screen, it shows a black image draw_all(); //this is just to show that drawing something simple on the offscreen bit map seems to have no effect Gdiplus::Pen pen(Gdiplus::Color(255, 0, 0, 255)); m_gdi_dc->DrawLine(&pen, 0,0,100,100); DWORD last_error = GetLastError(); //returns '0' at this stage } And here's the snipit that handles the WM_PAINT message: ---8<----------------------- //Paint message snippit case WM_PAINT: { BITMAP bm; PAINTSTRUCT ps; HDC hdc = BeginPaint(vg->m_hwnd, &ps); //get the HWNDs DC HDC hdcMem = vg->m_gdi_dc->GetHDC(); //get the HDC from our offscreen GDI+ object unsigned int width = vg->m_gdip_offscreen_bm->GetWidth(); //width and height seem fine at this point unsigned int height = vg->m_gdip_offscreen_bm->GetHeight(); BitBlt(hdc, 0, 0, width, height, hdcMem, 0, 0, SRCCOPY); //this blits a black rectangle DWORD last_error = GetLastError(); //this was '0' vg->m_gdi_dc->ReleaseHDC(hdcMem); EndPaint(vg->m_hwnd, &ps); //end paint return 1; } ---8<----------------------- My apologies for the long post. Does anybody know what I'm not quite understanding regarding how you write to an offscreen buffer using GDI+ (or GDI for that matter)and then display this on screen? Thank you for reading.

    Read the article

  • Using OpenGL Without X-Window System

    - by user366250
    Hell every body , i am newbie in linux programming ( Not Windows ) . i want to know how i can using OpenGL on Linux Platform Without X-Window System , can i send OpenGL Graphics Directly to Framebuffer Device ?! There Is Project Named DirectFB ( Direct FrameBuffer ) . with DirectFB We can do this but DirectFB needs for driver for each hardware and i want to user a graphic card that only have linux driver . what is your suggestion to Me . Thanku.

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >