Jump to content

Zarklord

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

444 profile views

Zarklord's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. the title ^ but in all seriousness when ever i have done a if statment that is something like: if (currentPixel.R != 0 && currentPixel.B != 0 && currentPixel.G != 0 && currentPixel.A != 0) { //do something } it doesn't work, and I know that the code isn't exactly correct(it was correct when I tried it in codelab)i was just showing you what i tried basically I want to know if a pixels exists at all(the way i would determine that the code works would be new file ctrl + a then delete and then have it do something so i can know that it doesn't run even once(for instance have it write text that says "failed" inside the if block so that if the if statement is true even once then then ill know). thank you
  2. I Have Solved My Problem By Using Custom Spacing For Each Letter Thank You For All Your Help
  3. that is what i have unless there is something to do with the point in between font and stringformat(cause i have no idea what it is used for) then the values above are correct(for generic Typograph)...
  4. A I am using a font called DFGMincho-SU it is Little Weird and the size is 105.4 so maybe but i remember the size being a quite a bit more than that and also the extra amount of pixels is a difference cause i need them to be exactly 580 if they are larger than 580(IE i am already scaling them down some i dont want to scale more than nessacary) Edit: i measured one and the value was correct and another one was 6px off... so no accuracy
  5. i cant get the dimenesions of the text to be able to resize ie if i type NAMEPLATE and want to get the dimmensions of the word (IE x, y) in code but i cant. as using measurestring and measurecharacterranges both return incorrect values
  6. well the current problem i am having is not being able to select the text and only the text exactly it is always a couple pixels over...
  7. there could be nameplates that are two lines and i might want to compress them in Y... and the idea is my plugin will draw the letters for the nameplate, resize the nameplate, position the nameplate efficiently(IE so that you could fit as any as possible on a canvas). then rinse, repeat for each name plate the user requests... although there doesnt appear to be a way to get the width of the nameplate accuratley...
  8. thx you so far with your help... so the best way for you to help me is for me to explain what i am doing... so for a game there are nameplates i am making now it is crucial that no nameplates say go over 580 pixels, this only matters for nameplates larger than 580 pixels so what I need is: a: if i have my start point(x:30, y:30) figure out my endpoint i would prefer to do this in code as it would be much simpler(rather than measurements because the spacing is random(well not really random, but say different for each letter(ie the pixels between 2 A's might be 2px but the spacing between AB might be 4px)...). b:then resize if the width is greater than 580(this value might change but it should just be matter of updating a constant if I do it right) to 580(also for a special case resize height but the same principles should apply. right?). c: move it on the dest surface positioning correctly this should be as simple as start drawing the pixels at pos x, y(whatever those may be) and iterating through the pixels... EDIT i discovered g.MeasureString but the values are higher than they should be... Why?
  9. so that peice of code gets me a surface that contains only the bounding box of my supplied x, y ?
  10. I want to resize something if it is bigger than X number of pixels to be equal to X number of pixels now to be clear this is not resize the selection box the users sees but resizing a internal selection box i have defined(assuming it is in the selection box the user made) is that possible?
×
×
  • Create New...