Search Results

Search found 4508 results on 181 pages for 'connor black'.

Page 15/181 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Drawing a texture with an alpha channel doesn't work -- draws black

    - by DevDevDev
    I am modifying GLPaint to use a different background, so in this case it is white. Anyway the existing stamp they are using assumes the background is black, so I made a new background with an alpha channel. When I draw on the canvas it is still black, what gives? When I actually draw, I just bind the texture and it works. Something is wrong in this initialization. Here is the photo - (id)initWithCoder:(NSCoder*)coder { CGImageRef brushImage; CGContextRef brushContext; GLubyte *brushData; size_t width, height; if (self = [super initWithCoder:coder]) { CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; eaglLayer.opaque = YES; // In this application, we want to retain the EAGLDrawable contents after a call to presentRenderbuffer. eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1]; if (!context || ![EAGLContext setCurrentContext:context]) { [self release]; return nil; } // Create a texture from an image // First create a UIImage object from the data in a image file, and then extract the Core Graphics image brushImage = [UIImage imageNamed:@"test.png"].CGImage; // Get the width and height of the image width = CGImageGetWidth(brushImage); height = CGImageGetHeight(brushImage); // Texture dimensions must be a power of 2. If you write an application that allows users to supply an image, // you'll want to add code that checks the dimensions and takes appropriate action if they are not a power of 2. // Make sure the image exists if(brushImage) { brushData = (GLubyte *) calloc(width * height * 4, sizeof(GLubyte)); brushContext = CGBitmapContextCreate(brushData, width, width, 8, width * 4, CGImageGetColorSpace(brushImage), kCGImageAlphaPremultipliedLast); CGContextDrawImage(brushContext, CGRectMake(0.0, 0.0, (CGFloat)width, (CGFloat)height), brushImage); CGContextRelease(brushContext); glGenTextures(1, &brushTexture); glBindTexture(GL_TEXTURE_2D, brushTexture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, brushData); free(brushData); } //Set up OpenGL states glMatrixMode(GL_PROJECTION); CGRect frame = self.bounds; glOrthof(0, frame.size.width, 0, frame.size.height, -1, 1); glViewport(0, 0, frame.size.width, frame.size.height); glMatrixMode(GL_MODELVIEW); glDisable(GL_DITHER); glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_ALPHA); glEnable(GL_POINT_SPRITE_OES); glTexEnvf(GL_POINT_SPRITE_OES, GL_COORD_REPLACE_OES, GL_TRUE); glPointSize(width / kBrushScale); } return self; }

    Read the article

  • white in the black

    - by gcc
    how can i detect white image surrounded by black image take input 000 000 000 000 000 255 255 255 000 000 255 255 255 000 000 255 255 255 000 000 000 000 000 000 000 make it simpliest form 0 0 0 0 0 2 2 2 0 0 2 2 2 0 0 2 2 2 0 0 that step i couldnot did then search for coordinate of leading entry x,y then determine are there any detection if not print no detection else go another step find length of the square and how can calculate length and widht of the square

    Read the article

  • NSColor transparency on black background?

    - by Alex Zielenski
    In the background of my view, I draw a light blue color. And in the middle, i have a square box that is supposed to have an even lighter gray in it that has a 20% transparency. But for some reason the transparency is on top of a black background instead of a blue. I'm sorry If i'm not being clear.

    Read the article

  • white in the black [closed]

    - by gcc
    how can i detect white image surrounded by black image 000 000 000 000 000 255 255 255 000 000 255 255 255 000 000 255 255 255 000 000 000 000 000 000 000 and how can calculate length and widht of the square

    Read the article

  • MATLAB: Drawing a line over a black and white image

    - by Richard
    This is quite possibly an extremely retarded question, but what is the best way to draw a line over a black and white (binary) image in MATLAB, provided the start and end coordinates are known? Please note, I am not trying to add an annotation line, I would like the line to become part of the image.

    Read the article

  • good word whitelist to override bad word black list

    - by dangerousguy
    I've read through the discussion here... http://stackoverflow.com/questions/273516/how-do-you-implement-a-good-profanity-filter I've decided to implement a bad word filter using the badlist referenced in that thread. However I'm thinking about the scunthorpe problem. (see wikipedia I can't post the link, I'm a new user) Is there a white list of words like scunthorpe and manuscript that I can use to override a black list? (not interested in discussions about sensorship etc)

    Read the article

  • TabBarController NavigationController with black backgroundbar

    - by Simon
    hello I've placed this code my didload method, to get a black Navigationbar. rootTabBarController.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; rootTabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; its working fine, but when the user rearranges the Icons in the editmode, i'm getting a default blue navigation bar. Can anyone help me to avid this ? btw: big thanks to the genius crowd!

    Read the article

  • Weird black spots on custom Google Map with IE

    - by Domenic
    Hello. I'm getting some weird black spots with a custom map page (via the Google Maps API v2.x) I have created. (Click SERVICIOS and then the icon farthest south to generate image shown below.) The issue seems to only appear when using Internet Explorer. I'm wondering if this is a common problem and if there is a common fix? Any ideas? Thanks.

    Read the article

  • [Silverlight] MessageBox Black Page

    - by nCdy
    I do Silverlight MVC project on VWDEE2010 when I do private void button1_Click(object sender, RoutedEventArgs e) { MessageBox.Show("I am a button"); } Message shows on BlackScreen on background and only when I click OK it returnts me to my page. Why black page and what ways to avoid ? Thank you.

    Read the article

  • imagefill() turns rest of the area black

    - by Nidhinzz Own
    I'm using imagefill() for changing the background color if an image.But while doing so the other areas which are not to be affected, change its color to black. $image = imagecreatefrompng("sample.png"); $background = imagecolorallocate($image, 255, 0,0); imagefill($image, 0,0, $background); header("content-type: image/png"); imagepng($image,"sample.png"); This is my code.Can anyone tell me how this is happening ?

    Read the article

  • black screen while retrieving result from webservices in android

    - by Aswan
    Hi Folks i am using following webservices for retrieving data from server server side:.net client side:ksoap2 whenever activity start, onCreate i am using spinner for displying data returned by the webservices when this activity start it showing black screen after lunching the activity .i found black screen is coming when activity connecting to webservices How to resolve this MyCode public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { //Display the online and busy people display in spinner //people are display in relative people only(Mygroup) /* get the online and busy people who are in user group from DB*/ users_names_ids=new ParseXMLString().convertusernames(new DataParsingComm().ILGetOnlinePeoples("<spGetOnlinePeoples><UserID>"+GetCurrentUserID.id+"</UserID></spGetOnlinePeoples>")); /* create an array with the size of number of peoples whose status is online or busy */ String[] array =new String[users_names_ids.size()]; int setselction=0;// initialize the selection to 0. /* if array length is greater than zero, that means getting at least one person whose status is online or busy */ if(array.length>0){ /* Returns an enumeration on the keys of this Hashtable instance. And assigns into Enumeration instance variable */ Enumeration e= users_names_ids.keys(); /* Iterate list Enumeration until it does't has any more elements */ for(int i=0;e.hasMoreElements();i++) try{ /* get all persons names into the array list */ array[i]=e.nextElement().toString(); /* Get the ChatUserName value from the ChatInPeopleDetails preferences. And If it is in this list set selection to the index 'i' */ if(getSharedPreferences("ChatInPeopleDetails", 0).getString("ChatUserName", "").equals(array[i])) setselction=i; /* * Get the String value of Relname, that previously added with putExtra() as extended data to the parent intent * If that value is not null and exists in the array list then * set the selection to the index 'i'. * */ else if(getIntent().getStringExtra("Relname")!=null && getIntent().getStringExtra("Relname").equals(array[i])) setselction=i; }catch(Exception ex){ ex.printStackTrace(); } finally { System.gc(); System.runFinalization(); } } /* create a new array adapter with the ChatForm context and array objects */ ArrayAdapter<String> adapter2 = new ArrayAdapter<String>(ChatForm.this,android.R.layout.simple_spinner_item, array); /* Set the layout resource to create the drop down views. */ adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); /* The Adapter is used to provide the data which backs this Spinner SpinnerUsersToChat. */ ((Spinner)findViewById(R.id.SpinnerUsersToChat)).setAdapter(adapter2); /* Get the ChatUserName value from the ChatInPeopleDetails preferences. If this value is not null*/ if(getSharedPreferences("ChatInPeopleDetails", 0).getString("ChatUserName", "") !=null) { /* Set the currently selected item of spinner based on selection variable value */ ((Spinner)findViewById(R.id.SpinnerUsersToChat)).setSelection(setselction); } /* Register a callback to be invoked when an item in this AdapterView has been selected.*/ ((Spinner)findViewById(R.id.SpinnerUsersToChat)).setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parent,View v,int position,long id) { /* call getMsg() to get messages and display them*/ getMsg(); /* Causes the Runnable to be added to the message queue. The runnable will be run on the user interface thread.*/ ((ScrollView)findViewById(R.id.ScrollView06)).post(new Runnable() { public void run() { /* This fullScroll() method will scroll the view to the bottom .*/ ((ScrollView)findViewById(R.id.ScrollView06)).fullScroll(View.FOCUS_DOWN); } }); } /* on nothing selected to do somthing . this an overridden method */ public void onNothingSelected(AdapterView<?> arg0) { } }); } catch (Exception e1) { e1.printStackTrace(); } }

    Read the article

  • how to make a div(black border,and on the google-maps) panel drop-disable,thanks

    - by zjm1126
    the black div is used to panel,so it can not be droppable. <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width,minimum-scale=0.3,maximum-scale=5.0,user-scalable=yes"> </head> <body onload="initialize()" onunload="GUnload()"> <style type="text/css"> *{ margin:0; padding:0; } .container{ padding:10px; width:50px; height:50px; border:5px solid black; } </style> <!--<div style="width:100px;height:100px;background:blue;"> </div>--> <div id="map_canvas" style="width: 500px; height: 300px;"></div> <!-- <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> --> <script src="jquery-1.4.2.js" type="text/javascript"></script> <script src="jquery-ui-1.8rc3.custom.min.js" type="text/javascript"></script> <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA-7cuV3vqp7w6zUNiN_F4uBRi_j0U6kJrkFvY4-OX2XYmEAa76BSNz0ifabgugotzJgrxyodPDmheRA&sensor=false"type="text/javascript"></script> <script type="text/javascript"> var aFn; //********** function initialize() { if (GBrowserIsCompatible()) { //************ function a() { } a.prototype = new GControl(); a.prototype.initialize = function(map) { var container = document.createElement("div"); var a=''; for(i=0;i<5;i++){ a+='<div class=b style="width: 20px; height: 20px;background:red;position:absolute;"></div>' } $(container).addClass('container'); $(container).droppable( 'destroy' ).css('z-index','2700') $(map.getContainer()).append($(container).append(a)); return container; } a.prototype.getDefaultPosition = function() { return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7)); } //************ var map = new GMap2(document.getElementById("map_canvas")); map.addControl(new a()); var center=new GLatLng(39.9493, 116.3975); map.setCenter(center, 13); aFn=function(x,y){ var point =new GPoint(x,y) point = map.fromContainerPixelToLatLng(point); //console.log(point.x+" "+point.y) map.addOverlay(new GMarker(point)); } $(".b").draggable({}); $("#map_canvas").droppable({ drop: function(event,ui) { //console.log(ui.offset.left+' '+ui.offset.top) aFn(ui.offset.left+10,ui.offset.top+10); ui.draggable.remove(); } }); } } //************* </script> </body> </html>

    Read the article

  • Ubuntu 12.04 I'm trying to ugrade my Geforce 8400 to Geforce GTX 560, getting a black screen

    - by Stuart Anderson
    I have an NVidia Geforce 8400 which is working fine in Ubuntu 12.04. I have just purchased an NVidia GeForce GTX 560 and have been trying to install it. No matter what I do all I get is a black screen on boot up. I have tried; 1/ Additional Drivers, driver version 295.40, this works for the GeForce 8400 but gives me a black screen with the GTX 560 when I boot. 2/ Downloaded driver version 295.40 from NVidias site, was able to install it successfully, it works with my 8400 but gives me a black screen with the GTX 560 when I boot. Are there any options I can try?

    Read the article

  • Gradient fill bitmap and CreatePatternBrush just gives black fill instead of gradient

    - by mtopley
    I'm trying to create a Gradient Brush in windows mobile as follows: HBITMAP hBitmap = CreateBitmap(16, 16, 1, 16, NULL); HDC hDC = CreateCompatibleDC(NULL); HBITMAP hPrevious = SelectObject(hDC,hBitmap); TRIVERTEX vert[2]; GRADIENT_RECT gRect; ... fill in vert and gRect GradientFill(hDC, vert, 2,&gRect, 1, Direction); SelectObject(hDC, hPrevious); Delete(hDC); HBRUSH hPatternBrush = CreatePatternBrush(hBitmap); HDC hDC = BeginPaint(hWnd, &ps); SelectObject(hDC, hPatternBrush); RoundRect(hDC, ...); EndPaint(hWND, &ps); This code create a round rect with a black background, not the pattern brush. I can draw the hBitmap which is used to create the brush and it draws the gradient. Anyone got a solution?

    Read the article

  • White (Light) vs. Black (Dark) Backgrounds: Health Effects

    - by Hosam Aly
    I am adding a bounty to this question, hoping for some scientific research results. Thank you everybody! I have recently tried working on dark backgrounds, and it seemed (to me) to be easier on the eye. However, today I read Gerrie Schenck's comment on this answer, in which he said that mainframe developers were advised to use white backgrounds instead of black, as it is said that white is easier on the eye. So which one is actually better for the eyes in the long run? I would be thankful for any (scientific) references about the subject, as my eyes really need some relaxation. I wanted to make this question a community wiki, but I think that the least I can do to thank people is to reward their answers, so I'm leaving it as a normal question. Many, many thanks for your help. P.S. I don't know which tags would be appropriate for this question, so I'd be grateful if you could tag it in a better way than I did.

    Read the article

  • Getting black images with selenium.captureScreenshot

    - by Lidia
    I'm executing selenium tests with testng, that are started on a remote system with Selenium RC via hudson (with ssh connection). The remote system is windows xp with MKS Toolkit installed, hence ssh. Tests are NOT executed as a windows service. I've tried using both captureScreenshot and captureEntirePageScreenshot methods. The first one always produces a black image. The second one creates the correct screen shot but it only works on Firefox and our tests usually pass on Firefox and fail in other browsers, so it is crucial to capture screen shots for the other browsers (mainly IE and Safari). The tests are ran in parallel, with many browser windows open at the same time. I'm not certain if this is what's causing the problem. Any thoughts will be appreciated.

    Read the article

  • OpenNETCF DirectShowPlayerControl display is going black randomly when playing videos if the player

    - by Sundar
    I have a application that runs on touch enabled device with WinCE 3.5 OS. I have a show player control to display adds when the system is left idle for some configured amount of time.. So the DirectShowPlayerControl will be iniated every time the show player is launched and will be destroyed when it is closed... The player for the first time plays videos continuously for any amount of time. Once the player is destroyed and recreated the video are changing but the display goes black and in between if some small video is placed that alone is displayed. Whenever the form is closed am calling DirectShowPlayerControl.Dispose() method.

    Read the article

  • Direct2D window black when not in focus

    - by Saul Rennison
    Hi all, I have a Direct2D window which paints fine when in focus; however, when focus moves to another window (same application or another), the entire window goes black. I pinned the issue down to the use of ID2D1HwndRenderTarget::Clear. This function is vital to my application as without it, painting becomes rather... weird. Is there a way an un-focused Direct2D window can paint as normal (note: WM_PAINT is being called as usual, as is Clear, BeginPaint, etc. all without error) Thanks in advance.

    Read the article

  • Setting foreground color for HSSFCellStyle is always coming out black

    - by Ascalonian
    I am using POI to create an Excel spreadsheet in Java. I have the following code used for creating a header row: HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("Report"); // some more code HSSFRow row = sheet.createRow(0); HSSFCell cell = row.createCell(cellNumber); HSSFCellStyle cellStyle = wb.createCellStyle(); cellStyle.setFillBackgroundColor(HSSFColor.GREY_25_PERCENT.index); cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); HSSFFont font = wb.createFont(); font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); font.setColor(HSSFColor.WHITE.index); cellStyle.setFont(font); cell.setCellStyle(cellStyle); The issue I am having is that setting the fill background color on the cell always comes out black, no matter what color I pick. What am I doing wrong? If I don't use the "setFillPattern" line, no color shows up at all.

    Read the article

  • Activity should be transparent, but has black background

    - by Uwe Krass
    I followed the instructions of writing a transparent layout. My res/values/style.xml looks like this: <resources> <style name="Theme" parent="android:Theme" /> <style name="Theme.Transparent"> <item name="android:windowBackground">@drawable/transparent_background</item> </style> <drawable name="transparent_background">#00000000</drawable> </resources> The activity snippet looks like this: <activity android:name=".Controlls" android:label="Controlls" android:theme="@style/Theme.Transparent"> When I start this activity from my root activity, the layout gets drawn correctly, but the background stays black.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >