Search Results

Search found 10662 results on 427 pages for 'cursor position'.

Page 27/427 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • CS3, Illustrator - Where Do X/Y Coordinates Measure from?

    - by nicorellius
    I have a project where there are several PDF files. I'm using Illustrator to make these. It seems the point/line of origin is inconsistent from image to image (file to file). Where is the point of origin, by default, in CS3 Illustrator? It would be nice if, while I was positioning images, I could just say, "OK, x coordinate is 5.5 inches in this document, so it is 5.5 in that one." But it seems this is not the case. Anyone know how Illustrator sets these parameters?

    Read the article

  • Get the touch position inside the imageview in android

    - by Manikandan
    I have a imageview in my activity and I am able to get the position where the user touch the imageview, through onTouchListener. I placed another image where the user touch over that image. I need to store the touch position(x,y), and use it in another activity, to show the tags. I stored the touch position in the first activity. In the first activity, my imageview at the top of the screen. In the second activity its at the bottom of the screen. If I use the position stored from the first acitvity, it place the tag image at the top, not on the imageview, where I previously clicked in the first activity. Is there anyway to get the position inside the imageview. FirstActivity: cp.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub Log.v("touched x val of cap img >>", event.getX() + ""); Log.v("touched y val of cap img >>", event.getY() + ""); x = (int) event.getX(); y = (int) event.getY(); tag.setVisibility(View.VISIBLE); int[] viewCoords = new int[2]; cp.getLocationOnScreen(viewCoords); int imageX = x - viewCoords[0]; // viewCoods[0] is the X coordinate int imageY = y - viewCoords[1]; // viewCoods[1] is the y coordinate Log.v("Real x >>>",imageX+""); Log.v("Real y >>>",imageY+""); RelativeLayout rl = (RelativeLayout) findViewById(R.id.lay_lin); ImageView iv = new ImageView(Capture_Image.this); Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.tag_icon_32); iv.setImageBitmap(bm); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); params.leftMargin = x; params.topMargin = y; rl.addView(iv, params); Intent intent= new Intent(Capture_Image.this,Tag_Image.class); Bundle b=new Bundle(); b.putInt("xval", imageX); b.putInt("yval", imageY); intent.putExtras(b); startActivity(intent); return false; } }); In TagImage.java I used the following: im = (ImageView) findViewById(R.id.img_cam22); b=getIntent().getExtras(); xx=b.getInt("xval"); yy=b.getInt("yval"); im.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { int[] viewCoords = new int[2]; im.getLocationOnScreen(viewCoords); int imageX = xx + viewCoords[0]; // viewCoods[0] is the X coordinate int imageY = yy+ viewCoords[1]; // viewCoods[1] is the y coordinate Log.v("Real x >>>",imageX+""); Log.v("Real y >>>",imageY+""); RelativeLayout rl = (RelativeLayout) findViewById(R.id.lay_lin); ImageView iv = new ImageView(Tag_Image.this); Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.tag_icon_32); iv.setImageBitmap(bm); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( 30, 40); params.leftMargin =imageX ; params.topMargin = imageY; rl.addView(iv, params); return true; } });

    Read the article

  • My Sprite comes out the screen

    - by IlNero
    If i an action moves the sprite,how can i keep the CCSprite on the screen???? this is my code: [enemy runAction:[CCSequence actions:[CCMoveBy actionWithDuration:2.0 position:ccp(-winSize.width*0.4, 0)], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(winSize.width*0.2, -winSize.width*0.2), randomValueBetween(winSize.height*0.2, -winSize.height*0.2))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(winSize.width*0.2, -winSize.width*0.2), randomValueBetween(winSize.height*0.2, -winSize.height*0.2))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(winSize.width*0.2, -winSize.width*0.2), randomValueBetween(winSize.height*0.2, -winSize.height*0.2))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(winSize.width*0.2, -winSize.width*0.2), randomValueBetween(winSize.height*0.2, -winSize.height*0.2))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(winSize.width*0.2, -winSize.width*0.2), randomValueBetween(winSize.height*0.2, -winSize.height*0.2))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(-winSize.width*0.3,winSize.width*0.3), randomValueBetween(winSize.height*0.3, -winSize.height*0.3))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(-winSize.width*0.2,winSize.width*0.2), randomValueBetween(winSize.height*0.2, -winSize.height*0.2))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(-winSize.width*0.3,winSize.width*0.3), randomValueBetween(winSize.height*0.3, -winSize.height*0.3))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(-winSize.width*0.2,winSize.width*0.2), randomValueBetween(winSize.height*0.2, -winSize.height*0.2))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(-winSize.width*0.3,winSize.width*0.3), randomValueBetween(winSize.height*0.3, -winSize.height*0.3))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:randomValueBetween(1.0, 0.3) position:ccp(randomValueBetween(-winSize.width*0.2,winSize.width*0.2), randomValueBetween(winSize.height*0.2, -winSize.height*0.2))], [CCDelayTime actionWithDuration:0.5], [CCMoveBy actionWithDuration:2.0 position:ccp(-winSize.width*1.5, 0)], [CCCallFuncN actionWithTarget:self selector:@selector(invisNode:)], nil]]; but whit this code the sprite sometimes comes out the screen, i need the sprite moves randomly in the screen without comes out..

    Read the article

  • How to make other semantics behave like SV_Position?

    - by object
    I'm having a lot of trouble with shadow mapping, and I believe I've found the problem. When passing vectors from the vertex shader to the pixel shader, does the hardware automatically change any of the values based on the semantic? I've compiled a barebones pair of shaders which should illustrate the problem. Vertex shader : struct Vertex { float3 position : POSITION; }; struct Pixel { float4 position : SV_Position; float4 light_position : POSITION; }; cbuffer Matrices { matrix projection; }; Pixel RenderVertexShader(Vertex input) { Pixel output; output.position = mul(float4(input.position, 1.0f), projection); output.light_position = output.position; // We simply pass the same vector in screenspace through different semantics. return output; } And a simple pixel shader to go along with it: struct Pixel { float4 position : SV_Position; float4 light_position : POSITION; }; float4 RenderPixelShader(Pixel input) : SV_Target { // At this point, (input.position.z / input.position.w) is a normal depth value. // However, (input.light_position.z / input.light_position.w) is 0.999f or similar. // If the primitive is touching the near plane, it very quickly goes to 0. return (0.0f).rrrr; } How is it possible to make the hardware treat light_position in the same way which position is being treated between the vertex and pixel shaders? EDIT: Aha! (input.position.z) without dividing by W is the same as (input.light_position.z / input.light_position.w). Not sure why this is.

    Read the article

  • jquery Setting cursor position in contenteditable div

    - by Mark
    The old version of the question is below, after researching more, I decided to rephrase the question. The problem as before is, I need to focus a contenteditable div without highlighting the text, doing straight up focus highlights the text in Chrome. I realize that people solved this problems in textareas by resetting the caret position in the textarea. How can I do that with a contenteditable element? All the plugins I've tried only works with textareas. Thanks. Old Phrasing of the question: I have a contenteditable element that I want to focus, but only insofar as to place the cursor at the front of the element, rather selecting everything. elem.trigger('focus'); with jquery selects all the text in the entire element in chrome. Firefox behaves correctly, setting the caret at the front of the text. How can I get Chrome to behave the way I want, or is focus perhaps not what I'm looking for. Thanks

    Read the article

  • mouse_event WinAPI call not working when cursor is over Flash

    - by friederbluemle
    Hi, I am writing a small program which can simulate mouse clicks at specified positions. Using the Win32 API call mouse_event like so: [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, UIntPtr dwExtraInfo); [Flags] public enum MouseEventFlags : uint { LEFTDOWN = 0x00000002, LEFTUP = 0x00000004, MIDDLEDOWN = 0x00000020, MIDDLEUP = 0x00000040, MOVE = 0x00000001, ABSOLUTE = 0x00008000, RIGHTDOWN = 0x00000008, RIGHTUP = 0x00000010 } mouse_event((uint)(MouseEventFlags.LEFTDOWN | MouseEventFlags.LEFTUP), x, y, 0, UIntPtr.Zero); Works perfectly fine, except when the mouse cursor is over a Flash application. Flash seems to ignore the simulated mouse click. What could be the reason for this? And how do I fix it? Thank you!

    Read the article

  • Get text under mouse cursor in mac osx leopard/snow leopard

    - by Liuyi Sun
    Hi there, is there any idea for getting the text under the mouse cursor? I'm trying to build a dictionary app, that pops up a panel of translates when mouse hangs over a word. I took a look at the accessiblity apis, and it only can find the current ui element, but not the current word... my last choice will be makeing screenshots frequently, and doing ocr... that'll be cpu consuming, I don't like that.. any idea for this? thanks in advance!

    Read the article

  • Finding x,y position of a datagrid / adavancedDataGrid row in Flex

    - by zak kus
    I have flex advancedDataGrid (could use dataGrid if that works better, though i like my meta-column headers), and i want to have a component popup on top of a selected row. The problem is, i can figure out how to reference an actual rendered row of a datagrid (rather than an item of the dataprovider) in order to get its position on the screen. Does anyone have any theories on how to access a "row" of a datagrid, or at least get its position? Cheers

    Read the article

  • Rotate a CALayer when it reaches a certain position

    - by jbrennan
    I've got a CALayer with two CAKeyframeAnimations added to it. One is for @"transform" and the other is for @"position". I am rotating the layer and translating it with these two animations. I am wondering, is there a way I can set the keyframes to happen at the same time? I want to have a keyframe for rotation at the exact time my layer has reached a certain (x, y) position. How is this possible?

    Read the article

  • Bash alias to open Vim at last cursor position mark

    - by Pierre LaFayette
    The mark " in Vim takes you to your last cursor position. I want to create an alias that will open my Vim instance and jump to that mark; something which is obviously extremely useful. This works from the command line: $ vim -c "'\"" File.cpp Now I want to make an alias for this: $ alias v='vim -c "'\""' Well that's not going to work! You need to escape the first single quote you say... $ alias v='vim -c "\'\""' Hmm. That didn't work either... So I try a whole lot of variations of single quoted and double quoted madness, bang my head against the table and load up stackoverflow in my browser, and here we are. How do I properly escape this alias?

    Read the article

  • Mouse position in xaml - wpf

    - by Simon Fox
    Hi all Is it possible to specify the position of the mouse as the value of the Parameter property of a Command in XAML. Something like the following: <UserControl.ContextMenu> <ContextMenu> <MenuItem Header="Create Link" Command="{Binding CreateLink}" CommandParameter="{Binding Mouse.Position}" > </MenuItem> </ContextMenu> </UserControl.ContextMenu>

    Read the article

  • Position of builtInZoomControls in WebView and MapView

    - by Mathias Lin
    I noticed that the position of the builtInZoomControls in WebView (bottom, horizontal right) is not consistent with the default position in the MapView (bottom, horizontal center). 1) Why is that not consistent? (Probably a question to be asked to Google) 2) Is there a way to horizontal center the builtInZoomControls of the WebView without applying custom Zoom controls? Or is that the only way?

    Read the article

  • How to get video file details eg. duration in Android?

    - by spirytus
    I struggle to get specific video file details so duration etc. from the file the files recorded earlier. All I can currently do is to get cursor with all the files, then loop one by one. Cursor cursor = MediaStore.Video.query(getContext().getContentResolver(), MediaStore.Video.Media.EXTERNAL_CONTENT_URI, new String[]{MediaStore.Video.VideoColumns.DURATION,MediaStore.Video.VideoColumns.DATE_TAKEN,MediaStore.Video.VideoColumns.RESOLUTION,MediaStore.Video.VideoColumns.DISPLAY_NAME}); if(cursor.moveToFirst()) while(!cursor.isLast()){ if(cursor.getString(3)==fight.filename) { // do something here } cursor.moveToNext(); } I need however to access details of specific files so I tried to create URI but no luck as cursor returned is always null. Where do I go wrong? Uri uri = Uri.parse(Environment.DIRECTORY_DCIM+"/FightAll_BJJ_Scoring/"+(fight.filename)); Cursor cursor = MediaStore.Video.query(getContext().getContentResolver(), uri, new String[]{MediaStore.Video.VideoColumns.DURATION,MediaStore.Video.VideoColumns.DATE_TAKEN,MediaStore.Video.VideoColumns.RESOLUTION,MediaStore.Video.VideoColumns.DISPLAY_NAME}); // cursor is always null here

    Read the article

  • CreateDIBSection is throwing, when trying to create cursor on Win

    - by Anaamika
    Hi, I am trying to create Cursor from png, and CreateDIBSection() is throwing. Follwoing is the snippet of code: HDC hdc = GetDC(NULL); void* lpBits = NULL; HBITMAP hBitmap; try { hBitmap = CreateDIBSection( hdc, (BITMAPINFO*)&bi, 0, &lpBits, NULL, (DWORD)0); } ReleaseDC(NULL, hdc); As CreateDIBSection is throwing, the code to release DC is not getting executed. can you please let me know the possible issue behind this?

    Read the article

  • set position in a table

    - by Senthilkumar
    Hi can any one tell .. how to set position inside a table.. I have table inside which I have span and certain links .. I made as cetre alignment and span text s starting from centre but when i do the same for all links everthing displayed in centre if it own.. but i need to start all text at the same position/.. how to do this???

    Read the article

  • position of UITabbar

    - by user262325
    Hello everyone I try to place UITabbar on iPhone window using CGRectMake. But I found that the Y position is different from the display in Interface Builder. Is there anyone met the same problem? Using CGRectMake to locate the x,y position, is it possible cause the refusing from App stoe due to compatible reason? Thanks interdev

    Read the article

  • strange Problem with WPF Textbox stringformat - Cursor moves back

    - by Emad
    I am using WPF 4.0 TextBox and binding. I am using StringFormat to format the number as currency. the XAML looks like this: <TextBox Text="{Binding Path=ValueProperty, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, StringFormat={}{0:C}, UpdateSourceTrigger=PropertyChanged}"> </TextBox> Everything seems to work correctly except for a strange behavior: When for example a user types in 12: right after typing 1, the value in the textbox becomes $1.00 and the weird thing is the the cursor is moved to be between the $ and the 1. So when a user simply types in 12, the result becomes $21.00. How can I fix this strange behavior?

    Read the article

  • Constraining window position to desktop working area

    - by simplecoder
    I want to allow a user to drag my Win32 window around only inside the working area of the desktop. In other words, they shouldn't be able to have any part of the window extend outside the monitor(s) nor should the window overlap the taskbar. I'd like to do it in a way that does cause any stuttering. Handling WM_MOVE messages and calling MoveWindow() to reposition the window if it goes off works, but I don't like the flickering effect that's caused by MoveWindow(). I also tried handling WM_MOVING which prevents the need to call MoveWindow() by altering the destination rectangle before the move actually happens. This resolves the flickering problem, but another issue I run into is that the cursor some times gets aways from the window when a drag occurs allowing the user to drag the window around while the cursor is not even inside the window. How do I constrain my window without running into these issues?

    Read the article

  • ui tabs and position relative

    - by ntan
    Hi, I am using ui tabs a lot.In my last project i add an icon just before tabs and the tab links start a strange behavior, you can not click to change the tabs if you are above tab name BUT only when you are outside tab name. Here is the code <div style="float:left;display:inline;width:718px;padding:5px;border:1px solid #ececec"> <!--ICON just before TABs--> <div style="z-index:1;position:relative;top:30px;left:5px"> <img src="../graphics/icons/add.gif" onclick="AddTab();" href="javascript:void(0);" id="addNewTab"/> </div> <div id="tabs" > <ul > <li > <img src="../graphics/icons/x.gif" onclick="RemoveTab(this)" style="cursor: pointer;" /> <a href="#tab-1"><span id="tabContent-1"><span class="tabText" >TAB1</span></span></a> </li> <li > <img src="../graphics/icons/x.gif" onclick="RemoveTab(this)" style="cursor: pointer;" /> <a href="#tab-2"><span id="tabContent-2"><span class="tabText" >TAB2</span></span></a> </li> </ul> <div id="tab-1" > contents </div> <div id="tab-2" > contents </div> </div><!--tabs--> I know that ui.css has position relative for tabs .ui-tabs .ui-tabs-nav { list-style:none outside none; padding:0.2em 0.2em 0; position:relative; } and i dont know if meshing up with my icon. If i remove the position:relative from the icon (add.gif) everything works fine Any help is appreciated

    Read the article

  • Usage CursorLoader without ContentProvider

    - by sealskej
    Android SDK documentation says that startManagingCursor() method is depracated: This method is deprecated. Use the new CursorLoader class with LoaderManager instead; this is also available on older platforms through the Android compatibility package. This method allows the activity to take care of managing the given Cursor's lifecycle for you based on the activity's lifecycle. That is, when the activity is stopped it will automatically call deactivate() on the given Cursor, and when it is later restarted it will call requery() for you. When the activity is destroyed, all managed Cursors will be closed automatically. If you are targeting HONEYCOMB or later, consider instead using LoaderManager instead, available via getLoaderManager() So I would like to use CursorLoader. But how can I use it with custom CursorAdapter and without ContentProvider, when I needs URI in constructor of CursorLoader?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >