CN106569792A - Layer pixel alignment detection method based on iOS system - Google Patents

Layer pixel alignment detection method based on iOS system Download PDF

Info

Publication number
CN106569792A
CN106569792A CN201511020789.8A CN201511020789A CN106569792A CN 106569792 A CN106569792 A CN 106569792A CN 201511020789 A CN201511020789 A CN 201511020789A CN 106569792 A CN106569792 A CN 106569792A
Authority
CN
China
Prior art keywords
layer
window
pixel
relative
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201511020789.8A
Other languages
Chinese (zh)
Inventor
刘盛祥
杨虎
彭伟刚
顾思斌
潘柏宇
王冀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
1Verge Internet Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 1Verge Internet Technology Beijing Co Ltd filed Critical 1Verge Internet Technology Beijing Co Ltd
Priority to CN201511020789.8A priority Critical patent/CN106569792A/en
Publication of CN106569792A publication Critical patent/CN106569792A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the field of mobile terminals, in particular to a layer pixel alignment detection method based on an iOS system. The method comprises the steps that a root layer of a window is acquired, all layers in the window are traversed from the root layer, a layer pixel alignment judgment method is adopted to perform pixel alignment judgment on each layer, and a judgment result is fed back after judgment of all the layers is completed. The layer pixel alignment judgment method comprises the steps that S1, coordinates (x,y) of the layers relative to the window where the layers are located are acquired; S2, pixel point location reference values Vx and Vy of the layers are calculated; S3, whether Vx and Vy are both approximate to integers or not is judged, if yes, it is judged that pixels of the layers are aligned relative to the window, and if not, it is judged that the pixels of the layers are not aligned relative to the window. Through the method, whether layer pixels are aligned or not can be detected automatically, whether the problem of nonalignment of the layer pixels is due to the current layer or the upper-level layer can be further clarified, therefore, the root of the problem is positioned, and convenience is provided for layer adjustment in a later period.

Description

Figure layer pixel alignment detection method based on iOS system
Technical field
The present invention relates to field of mobile terminals, particularly a kind of figure layer pixel alignment detection method based on iOS system.
Background technology
The figure layer pixel of iOS system is alignd and is referred in iOS system, original position of the figure layer in interface relative to window Correspondence integer pixel.When pixel is not lined up, pattern edge can seem fuzzy, therefore whether pixel aligns and influence whether interface Fineness and fluency.Different from pc client exploitation, Mobile solution exploitation is in developmental stage, there is Technical Architecture not Ripe, professional shortage, the version iteration factor such as frequently, the design and developer for causing Mobile solution are had at interface Compromise is made in layout details and runnability, to exchange the shorter version updating cycle for.
The development process of current each Internet firm is substantially designer by the UI of a certain or several screen resolutions Mark figure gives developer, again by technological means such as self adaptation coordinate, relativeness, proportional zooms when developer programs, complete The adaptation of the screen resolution of figure is marked into all UI.The process of this adaptation is it is possible that the unjustified problem of pixel.Such as There is the unjustified figure layer of pixel in the figure layer at fruit interface, then can have a negative impact in rendering content, for example:Figure layer correspondence Text show fuzzy, or increase cpu load when picture processing is carried out, so as to reduce operational efficiency.Fig. 1 is taken from The screenshot capture of iPhone6Plus equipment, the text on the left side be its place figure layer pixel it is unjustified in the case of display effect, it is right The text on side is the display effect under its place figure layer pixel alignment condition, it is seen that, after the alignment of figure layer pixel, text shows Become apparent from.
Current is related in development process, although also can detect to whether figure layer pixel aligns, but the detection side Visual determination of the method by testing staff, without seeking unity of standard, whether text obscures the possibility for also recognizing, aligns as picture Basic None- identified.Also, this detection method easily causes testing staff's visual fatigue, and people is under visual fatigue state for detection Its detection efficiency and accuracy even more drastically decline, poor reliability.
The content of the invention
In order to overcome the deficiencies in the prior art, the present invention to propose a kind of figure layer pixel alignment detection side based on iOS system Method, the method can not only automatic detection figure layer pixel whether align, moreover it is possible to judging that figure layer pixel is further when unjustified The problem of specifying comes from the figure layer itself or upper level figure layer, so as to orientation problem root, provides just for the adjustment of later stage figure layer Profit.
The present invention provides a kind of figure layer pixel alignment decision method based on iOS system, and methods described comprises the steps:
The coordinate (x, y) of S1, acquisition figure layer relative to its place window;
S2, pixel point location reference value Vx and Vy that calculate the figure layer, wherein Vx=x × scale, Vy=y × scale, Scale represents the screen multiplying power of window place screen;
S3, judge whether Vx and Vy is all approximately equal to integer, if so, then judge that the figure layer is alignd relative to window pixel, if It is no, then judge that the figure layer is unjustified relative to window pixel.
Further, judge that figure layer also includes afterwards relative to window pixel is unjustified:
The coordinate (tx, ty) of S31, the acquisition figure layer relative to upper level figure layer;
S32, pixel point location reference value Vtx and Vty that calculate upper level figure layer, wherein Vtx=tx × scale, Vty= Ty × scale, scale represent the screen multiplying power of window place screen;
S33, judge whether Vtx and Vty is all approximately equal to integer, if so, then judge that the Coordinate Problem of the figure layer causes this Figure layer is unjustified relative to window pixel, if it is not, then judging that the Coordinate Problem of the upper level figure layer of the figure layer causes the figure layer It is unjustified relative to window pixel.
Further, also include after step S33:S34, cause the figure layer when the Coordinate Problem for judging the figure layer Relative to window pixel it is unjustified when, record and/or identify the figure layer;When the coordinate of the upper level figure layer for judging the figure layer Problem causes the figure layer unjustified relative to window pixel, records and/or identify the upper level figure layer of the figure layer.
Specifically, the figure layer is the upper left corner of the figure layer relative to the figure layer institute relative to the coordinate of its place window In the coordinate of window, the figure layer is the upper left corner of the figure layer relative to upper level figure layer relative to the coordinate of upper level figure layer Coordinate.
Preferably, when judging whether Vx, Vy, Vtx and Vty are approximately equal to integer, the degree of accuracy of Vx, Vy, Vtx and Vty is protected The decimal digits for staying is consistent.
Preferably, when judging whether Vx, Vy, Vtx and Vty are approximately equal to integer, the degree of accuracy of Vx, Vy, Vtx and Vty is equal Retain to percentile.
Correspondingly, present invention also offers a kind of figure layer pixel alignment detection method based on iOS system, methods described bag Include:Window chromosome layer is obtained, the All Layers in window are begun stepping through from the chromosome layer, alignd using above-mentioned figure layer pixel Decision method carries out pixel alignment and judges to each figure layer, and after the completion of All Layers judge, feedback and judge result.
The invention has the advantages that:
(1) the inventive method can not only automatic detection figure layer pixel whether align, moreover it is possible to judging figure layer pixel not During alignment, further clear and definite problem comes from the figure layer itself or upper level figure layer, so as to orientation problem root, is later stage figure Layer adjustment provides facility.
(2) the inventive method is applied to application and development stage and test phase, with quick, efficiency high of pinpointing the problems, no The advantage in version iteration cycle is affected, can make that interface layout is finer, it is more smooth to run with auxiliary development personnel optimization application.
(3) precision of testing result is improve using the inventive method, the defect that Visual Observations Observations cause to judge by accident is compensate for. Also, the inventive method reduces the access threshold of figure layer pixel alignment detection, reducing the specialized capability to testing staff will Ask, even if not understanding that the personnel of principle can still complete to detect work.
Description of the drawings
In order to be illustrated more clearly that technical scheme, below will be to wanting needed for embodiment or description of the prior art The accompanying drawing for using is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, right For those of ordinary skill in the art, on the premise of not paying creative work, can be obtaining which according to these accompanying drawings Its accompanying drawing.
Fig. 1 is taken from the screenshot capture of iPhone6Plus equipment;
Fig. 2 is the flow chart of the figure layer pixel alignment detection method based on iOS system;
Fig. 3 is the flow chart of the figure layer pixel alignment decision method based on iOS system;
Fig. 4 is that the design sketch before detection labelling is carried out using the inventive method;
Fig. 5 is that the design sketch after detection labelling is carried out using the inventive method.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on Embodiment in the present invention, those of ordinary skill in the art obtained on the premise of creative work is not made it is all its His embodiment, belongs to the scope of protection of the invention.
In the present invention, whether pixel alignment refers to whether figure layer aligns relative to window pixel to figure layer, therefore, judging figure Whether layer in pixel alignment procedure, should with figure layer relative to window coordinate being calculated and be judged.If judging mesh Whether layer of marking on a map in pixel alignment procedure, and acquisition is the target figure layer coordinate (x ', y ') of one-level figure layer thereon relatively, even if Calculated Vx ' and Vy ' are approximately equal to integer, can not think that target figure layer is alignd relative to window pixel, because if Upper level figure layer is unjustified relative to window pixel, then target figure layer is also unjustified relative to window pixel.Correspondingly, mesh The unjustified reason of layer pixel of marking on a map can be divided into two classes, and a class is that the coordinate of target figure layer itself is problematic, and a class is then mesh Mark on a map layer upper level figure layer coordinate it is problematic.In consideration of it, can by obtain target figure layer relative to window coordinate come Judge the whether pixel alignment of target figure layer, further by coordinate of the target figure layer relative to upper level figure layer being obtained judging mesh The unjustified reason of layer pixel of marking on a map, the present invention program is according to above-mentioned thinking.
Fig. 2 is flow chart of the present invention based on the figure layer pixel alignment detection method of iOS system, and the testing process includes:
Step one:Detection trigger event.For example:A toolbar floating window is write on status system hurdle, there is provided labelling, clear Except, close etc. option, by click on labelling option come detection trigger event;Or timing automatic detection program is set, reach inspection The survey time automatic detection trigger time;Or by shaking detection trigger etc..In practice, the form of detection trigger event has Various, here is not repeated one by one.
Step 2:The window in screen is obtained, from the beginning of the chromosome layer of the window, using depth-first, breadth First Or other traversal methods, the judgement of pixel alignment is carried out by the figure layer in a pair of windows.Fig. 3 is the figure layer picture based on iOS system The flow chart of element alignment decision method, the decision method of the pixel alignment are specially:
The coordinate (x, y) of S1, acquisition figure layer relative to its place window, coordinate of the figure layer relative to its place window For the figure layer the upper left corner relative to the figure layer place window coordinate, wherein x represents the horizontal seat of the pixel in the figure layer upper left corner Mark, y represent the pixel vertical coordinate in the figure layer upper left corner.
S2, pixel point location reference value Vx and Vy that calculate the figure layer, wherein Vx=x × scale, Vy=y × scale, Scale represents the screen multiplying power of window place screen;Figure layer coordinate is multiplied by screen multiplying power and can navigate to the specific pixel of figure layer Point.
S3, judge whether Vx and Vy is all approximately equal to integer, when judging whether Vx and Vy is all approximately equal to integer, take four houses five The method for entering round numbers, degree of accuracy retain to percentile, such as Vx=1.001, then can be determined that Vx is approximately equal to integer, Vy= 1.021, then can be determined that Vy is not approximately equal to integer;
If Vx and Vy are approximately equal to integer, judge that the figure layer is alignd relative to window pixel, perform S4;
If one or two is not approximately equal to integer during Vx and Vy appoints, judge that the figure layer is unjustified relative to window pixel, Following steps are performed further:
The coordinate (tx, ty) of S31, the acquisition figure layer relative to upper level figure layer, the figure layer is relative to upper level figure The coordinate of layer is the coordinate of the upper left corner relative to upper level figure layer of the figure layer, and wherein tx represents the pixel in the figure layer upper left corner Abscissa, ty represent the pixel vertical coordinate in the figure layer upper left corner;
S32, pixel point location reference value Vtx and Vty that calculate upper level figure layer, wherein Vtx=tx × scale, Vty= Ty × scale, scale represent the screen multiplying power of window place screen;
S33, judge whether Vtx and Vty is all approximately equal to integer, judge whether Vx and Vy is all approximately equal to integer one with above-mentioned Sample, when judging whether Vtx and Vty is all approximately equal to integer, the method for equally taking round number is judgement before and after guarantee The concordance of standard, the decimal digits that the degree of accuracy of Vx, Vy, Vtx and Vty retains are consistent, Vtx and Vty degree of accuracy equally retains To percentile;
If Vtx and Vty are approximately equal to integer, judge that the Coordinate Problem of the figure layer causes the figure layer relative to window picture Element is unjustified;
If one or two is not approximately equal to integer during Vtx and Vty appoints, the coordinate of the upper level figure layer of the figure layer is judged Problem causes the figure layer unjustified relative to window pixel;
S34, when the Coordinate Problem for judging the figure layer causes the figure layer unjustified relative to window pixel, record and/ Or identify the figure layer;When the Coordinate Problem of the upper level figure layer for judging the figure layer cause the figure layer relative to window pixel not Alignment, records and/or identifies the upper level figure layer of the figure layer.Specifically, can be by the pixel unjustified figure layer place page, seat The information such as mark are recorded with document form, to be remotely sent to related personnel;Or pixel unjustified figure layer is adopted Conspicuous color is marked, and directly to feed back to tester from interface, referring to Fig. 4-5, Fig. 4 is to be entered using the inventive method Design sketch before row detection labelling, Fig. 5 is the design sketch after labelling, and the font of circular pattern and side in Fig. 5 is by with eye-catching Color mark out, shows that the pixel of pattern or word place figure layer is unjustified.
The coordinate of S4, the next figure layer of acquisition relative to its place window, and execution step S2, S3.
Step 3:Judge whether to complete to judge that if so, then output judges knot to the pixel alignment of All Layers in window Really, if it is not, then return to step two.
The figure layer pixel alignment detection method of the present invention can make interface layout more smart with auxiliary development personnel optimization application Carefully, run more smooth.Relative to existing development process, it has the advantage that:
1st, quickly can pinpoint the problems on stream, efficiency high does not affect the version iteration cycle.
2nd, no technical threshold, does not understand that the personnel of principle can still complete to detect work.
3rd, testing result is more accurate, compensate for the shortcoming of Visual Observations Observations easily erroneous judgement.
Above disclosed is only a kind of preferred embodiment of the present invention, can not limit certainly the present invention's with this Interest field, therefore the equivalent variations made according to the claims in the present invention, still belong to the scope covered by the present invention.

Claims (7)

1. a kind of figure layer pixel alignment decision method based on iOS system, it is characterised in that methods described comprises the steps:
The coordinate (x, y) of S1, acquisition figure layer relative to its place window;
S2, pixel point location reference value Vx and Vy that calculate the figure layer, wherein Vx=x × scale,
Vy=y × scale, scale represent the screen multiplying power of window place screen;
S3, judge whether Vx and Vy is all approximately equal to integer, if so, then judge that the figure layer is alignd relative to window pixel, if it is not, then Judge that the figure layer is unjustified relative to window pixel.
2. the figure layer pixel alignment decision method based on iOS system according to claim 1, it is characterised in that process decision chart Layer also includes afterwards relative to window pixel is unjustified:
The coordinate (tx, ty) of S31, the acquisition figure layer relative to upper level figure layer;
S32, calculate upper level figure layer pixel point location reference value Vtx and Vty, wherein Vtx=tx × scale, Vty=ty × Scale, scale represent the screen multiplying power of window place screen;
S33, judge whether Vtx and Vty is all approximately equal to integer, if so, then judge that the Coordinate Problem of the figure layer causes the figure layer It is unjustified relative to window pixel, if it is not, then judging that the Coordinate Problem of the upper level figure layer of the figure layer causes the figure layer relative It is unjustified in window pixel.
3. the figure layer pixel alignment decision method based on iOS system according to claim 2, it is characterised in that the step Also include after rapid S33:S34, when the Coordinate Problem for judging the figure layer causes the figure layer unjustified relative to window pixel, Record and/or identify the figure layer;When the Coordinate Problem of the upper level figure layer for judging the figure layer causes the figure layer relative to window Mouth pixel is unjustified, records and/or identify the upper level figure layer of the figure layer.
4. the figure layer pixel alignment decision method based on iOS system according to claim 1, it is characterised in that the figure Layer relative to its place window coordinate be the figure layer coordinate of the upper left corner relative to the figure layer place window, the figure layer Relative to upper level figure layer coordinate be the figure layer coordinate of the upper left corner relative to upper level figure layer.
5. the figure layer pixel alignment decision method based on iOS system according to claim 1, it is characterised in that judging When whether Vx, Vy, Vtx and Vty are approximately equal to integer, the decimal digits that the degree of accuracy of Vx, Vy, Vtx and Vty retains is consistent.
6. the figure layer pixel alignment decision method based on iOS system according to claim 5, it is characterised in that judging When whether Vx, Vy, Vtx and Vty are approximately equal to integer, the degree of accuracy of Vx, Vy, Vtx and Vty retains to percentile.
7. a kind of figure layer pixel alignment detection method based on iOS system, it is characterised in that methods described includes:Obtain window Chromosome layer, begins stepping through the All Layers in window from the chromosome layer, is alignd using the figure layer pixel described in claim 1-6 Decision method carries out pixel alignment and judges to each figure layer, and after the completion of All Layers judge, feedback and judge result.
CN201511020789.8A 2015-12-30 2015-12-30 Layer pixel alignment detection method based on iOS system Pending CN106569792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511020789.8A CN106569792A (en) 2015-12-30 2015-12-30 Layer pixel alignment detection method based on iOS system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511020789.8A CN106569792A (en) 2015-12-30 2015-12-30 Layer pixel alignment detection method based on iOS system

Publications (1)

Publication Number Publication Date
CN106569792A true CN106569792A (en) 2017-04-19

Family

ID=58508764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511020789.8A Pending CN106569792A (en) 2015-12-30 2015-12-30 Layer pixel alignment detection method based on iOS system

Country Status (1)

Country Link
CN (1) CN106569792A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293329A (en) * 2006-03-31 2007-11-08 Canon Inc Display device
CN101321240A (en) * 2008-06-25 2008-12-10 华为技术有限公司 Method and device for multi-drawing layer stacking
CN101543412A (en) * 2008-03-26 2009-09-30 深圳迈瑞生物医疗电子股份有限公司 Method and device for calculating graph coordinate components based on two-dimensional ultrasonic imaging device
CN102736837A (en) * 2011-05-10 2012-10-17 新奥特(北京)视频技术有限公司 Subtitle editing method based on grid

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293329A (en) * 2006-03-31 2007-11-08 Canon Inc Display device
CN101543412A (en) * 2008-03-26 2009-09-30 深圳迈瑞生物医疗电子股份有限公司 Method and device for calculating graph coordinate components based on two-dimensional ultrasonic imaging device
CN101321240A (en) * 2008-06-25 2008-12-10 华为技术有限公司 Method and device for multi-drawing layer stacking
CN102736837A (en) * 2011-05-10 2012-10-17 新奥特(北京)视频技术有限公司 Subtitle editing method based on grid

Similar Documents

Publication Publication Date Title
CN105808416B (en) A kind of automated testing method and system of man-machine figure interactive interface
CN105184778B (en) Detection method and device
CN111091538B (en) Automatic identification and defect detection method and device for pipeline welding seams
CN108229461A (en) A kind of tunnel slot method for quickly identifying based on deep learning
CN110472597A (en) Rock image rate of decay detection method and system based on deep learning
CN104978270A (en) Automatic software testing method and apparatus
US20110252405A1 (en) Detecting user interface defects in a software application
CN106127746A (en) Circuit board element missing part detection method and system
CN109858414A (en) A kind of invoice piecemeal detection method
US20220092856A1 (en) Crack detection, assessment and visualization using deep learning with 3d mesh model
CN104391797A (en) GUI (graphical user interface) widget identification method and device
CN111914767B (en) Scattered sewage enterprise detection method and system based on multi-source remote sensing data
CN107491790A (en) A kind of neural network training method and device
CN104103069B (en) Image processing apparatus, image processing method and recording medium
US20210350521A1 (en) Method for computer-implemented determination of blade-defects of a wind turbine
CN108121648A (en) A kind of interface error monitoring method
CN107204040A (en) Multiple-Point Geostatistics modeling method and device, computer-readable storage medium
CN114373009A (en) Building shadow height measurement intelligent calculation method based on high-resolution remote sensing image
CN115908988A (en) Defect detection model generation method, device, equipment and storage medium
US8320662B2 (en) Distinguishing colors of illuminated objects using machine vision
CN118052992A (en) Image recognition model generation method, system, chip and memory
CN110310278A (en) Sliding window scan method based on surplus patterning method
CN117788790A (en) Material installation detection method, system, equipment and medium for general scene
CN103837135A (en) Workpiece detecting method and system
CN106569792A (en) Layer pixel alignment detection method based on iOS system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100080 Beijing Haidian District city Haidian street A Sinosteel International Plaza No. 8 block 5 layer A, C

Applicant after: Youku network technology (Beijing) Co.,Ltd.

Address before: 100080, A, 5, block 8, Sinosteel International Plaza, Haidian Avenue, Haidian District, Beijing

Applicant before: 1VERGE INTERNET TECHNOLOGY (BEIJING) Co.,Ltd.

CB02 Change of applicant information
TA01 Transfer of patent application right

Effective date of registration: 20200622

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 100080 Beijing Haidian District city Haidian street A Sinosteel International Plaza No. 8 block 5 layer A, C

Applicant before: Youku network technology (Beijing) Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20170419

RJ01 Rejection of invention patent application after publication